Skip to content

Commit 5f5308b

Browse files
authored
Update gemini-pr-review.yml
1 parent e09fa17 commit 5f5308b

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

.github/workflows/gemini-pr-review.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,10 @@ jobs:
2222
- name: Install dependencies
2323
run: pip install google-generativeai requests PyGithub
2424

25-
- name: Get PR diff
26-
id: diff
27-
env:
28-
GH_TOKEN: ${{ github.token }}
29-
run: |
30-
gh pr diff ${{ github.event.pull_request.number }} | sed '1,8d' > diff.txt # Remove the first 8 lines
31-
echo "DIFF=$(cat diff.txt)" >> $GITHUB_OUTPUT
32-
33-
- name: Debug diff output
34-
run: echo "${{ steps.diff.outputs.DIFF }}"
35-
36-
- name: Base64 encode and set DIFF environment variable
37-
run: |
38-
DELIMITER=$(openssl rand -hex 8)
39-
ENCODED_DIFF=$(echo "${{ steps.diff.outputs.DIFF }}" | base64)
40-
echo "INPUT_DIFF<<$DELIMITER" >> $GITHUB_ENV
41-
echo "$ENCODED_DIFF" >> $GITHUB_ENV
42-
echo "$DELIMITER" >> $GITHUB_ENV
43-
4425
- name: Run Gemini review script
4526
env:
4627
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
4728
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4829
PR_NUMBER: ${{ github.event.pull_request.number }}
4930
GITHUB_REPOSITORY: ${{ github.repository }}
50-
run: python ./hack/gemini_review.py "${{ steps.diff.outputs.DIFF }}"
31+
run: python./hack/gemini_review.py

0 commit comments

Comments
 (0)