fix: Gemini did something
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / Docker frontend validation (pull_request) Successful in 27s
CI / Docker backend validation (pull_request) Successful in 28s
CI / oxlint (pull_request) Successful in 31s
CI / eslint (pull_request) Successful in 41s
Gemini Review / Gemini (pull_request) Successful in 54s
CI / prettier (pull_request) Successful in 40s
CI / Checkstyle Main (pull_request) Successful in 54s
CI / test-build (pull_request) Successful in 54s
CI / Backend Tests (pull_request) Successful in 1m35s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / Docker frontend validation (pull_request) Successful in 27s
CI / Docker backend validation (pull_request) Successful in 28s
CI / oxlint (pull_request) Successful in 31s
CI / eslint (pull_request) Successful in 41s
Gemini Review / Gemini (pull_request) Successful in 54s
CI / prettier (pull_request) Successful in 40s
CI / Checkstyle Main (pull_request) Successful in 54s
CI / test-build (pull_request) Successful in 54s
CI / Backend Tests (pull_request) Successful in 1m35s
This commit is contained in:
parent
fcd3290875
commit
4b67ca90bf
1 changed files with 25 additions and 8 deletions
|
@ -57,22 +57,39 @@ jobs:
|
||||||
- name: Install claude code
|
- name: Install claude code
|
||||||
run: bun i -g @anthropic-ai/claude-code
|
run: bun i -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
|
- name: Get PR Diff
|
||||||
|
id: get_pr_diff
|
||||||
|
run: |
|
||||||
|
# Fetch the base branch to get the diff accurately
|
||||||
|
git fetch origin main:main
|
||||||
|
DIFF=$(git diff main...HEAD)
|
||||||
|
# Escape quotes and other special characters for the multiline string
|
||||||
|
ESCAPED_DIFF=$(echo "$DIFF" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
|
||||||
|
echo "diff=$ESCAPED_DIFF" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Gemini PR Review
|
- name: Gemini PR Review
|
||||||
if: steps.check-renovate.outputs.author != 'Renovate Bot'
|
if: steps.check-renovate.outputs.author != 'Renovate Bot'
|
||||||
env:
|
env:
|
||||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
PR_NUMBER: ${{ github.event.number }}
|
||||||
|
PR_DIFF: ${{ steps.get_pr_diff.outputs.diff }}
|
||||||
run: |
|
run: |
|
||||||
ANTHROPIC_BASE_URL=${{ secrets.ANTHROPIC_BASE_URL }} 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
|
ANTHROPIC_BASE_URL=${{ secrets.ANTHROPIC_BASE_URL }} 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}. The relevant changes are provided as a git diff below.
|
||||||
|
|
||||||
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.
|
--- Start of PR Diff ---
|
||||||
|
${PR_DIFF}
|
||||||
|
--- End of PR Diff ---
|
||||||
|
|
||||||
|
Only provide constructive feedback on the quality, correctness, readability, and potential issues in the code based on the provided diff. Do not make any changes or suggest complete rewrites—just review what is there. You can use the rest of the repository as context if needed, but focus your review on the changes shown in the diff.
|
||||||
|
|
||||||
Once you are done with your review, post your feedback as a reject or review on the pull request using the following exact format:
|
Once you are done with your review, post your feedback as a reject or review on the pull request using the following exact format:
|
||||||
|
|
||||||
tea \"<reject or approve>\" ${PR_NUMBER} \"<your review message here>\"
|
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
|
Make sure the comment is clear, professional, and helpful. Only run the tea comment command once you're finished reviewing all changes.
|
||||||
You may also use the tea cli to find out various things about the pull request
|
ALWAYS PUT A COMMENT
|
||||||
Don't be too strict
|
|
||||||
Also MAKE SURE TO ALWAYS MENTION WHAT FILES AND LINE NUMBERS ARE WRONG
|
You may also use the tea cli to find out various things about the pull request.
|
||||||
Use the tea cli at all cost"
|
Don't be too strict.
|
||||||
|
Also MAKE SURE TO ALWAYS MENTION WHAT FILES AND LINE NUMBERS ARE WRONG.
|
||||||
|
Use the tea cli at all cost."
|
||||||
|
|
Reference in a new issue