Merge branch 'main' into refactor-get-current-user
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / eslint (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 12s
CI / Checkstyle Main (pull_request) Successful in 30s
Setup Gitea Tea CLI / setup-and-login (pull_request) Successful in 1m3s

This commit is contained in:
Jan K9f 2025-05-28 08:45:03 +00:00
commit 20b7c445e0
No known key found for this signature in database
GPG key ID: 944223E4D46B7412

View file

@ -0,0 +1,66 @@
name: Setup Gitea Tea CLI
on:
pull_request:
types: [opened, synchronize] # Runs on new PRs and updates
jobs:
setup-and-login:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
fetch-tags: true
- name: Set Tea Version
id: tea_version
run: echo "version=0.9.2" >> $GITHUB_OUTPUT # Check for the latest version
- name: Download Tea CLI
run: |
TEA_VERSION=$(echo "${{ steps.tea_version.outputs.version }}")
wget "https://gitea.com/gitea/tea/releases/download/v${TEA_VERSION}/tea-${TEA_VERSION}-linux-amd64" -O tea
chmod +x tea
sudo mv tea /usr/local/bin/tea
- name: Verify Tea Installation
run: tea --version
- name: Add Gitea Login
env:
GITEA_URL: ${{ secrets._GITEA_URL }}
GITEA_TOKEN: ${{ secrets._GITEA_TOKEN }}
run: |
if [ -z "$GITEA_URL" ]; then
echo "Error: GITEA_URL secret is not set."
exit 1
fi
if [ -z "$GITEA_TOKEN" ]; then
echo "Error: GITEA_TOKEN secret is not set."
exit 1
fi
tea login add --name mygitea --url "$GITEA_URL" --token "$GITEA_TOKEN" --insecure ${{ startsWith(secrets._GITEA_URL, 'http://') || '' }}
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Install claude code
run: bun i -g @anthropic-ai/claude-code
- name: Claude PR Review
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
PR_NUMBER: ${{ github.event.number }}
run: |
claude --allowedTools "Bash(tea:*)" --allowedTools "Bash(git:*) Read Grep WebFetch Glob LS" -p "You are a code review assistant. Your task is to review the changes in Pull Request #${PR_NUMBER}. All relevant changes can be seen by looking at the git diff HEAD...main (NEVER EVER REVIEW ALL THE CODE ONLY THE ONE FROM THE DIFF you can use the rest as context) or using the tea cli which you can use and we are on gitea. Also make sure to only review the changes in this pull request
Only provide constructive feedback on the quality, correctness, readability, and potential issues in the code. Do not make any changes or suggest complete rewrites—just review what is there.
Once you are done with your review, post your feedback as a comment on the pull request using the following exact format:
tea \"<reject or approve>\" ${PR_NUMBER} \"<your review message here>\"
Make sure the comment is clear, professional, and helpful. Only run the tea comment command once you're finished reviewing all changes. AND MOST IMPORTANDLY ONLY REVIEW THE DIFF FROM THE CURRENT STATE TO THE MAIN BRANCH TO GET THAT USE GIT DIFF."