@@ -2,9 +2,9 @@ name: Analyze PR Diff with LLM
2
2
3
3
on :
4
4
pull_request :
5
- types : [opened, synchronize, reopened ]
5
+ types : [opened, synchronize]
6
6
branches :
7
- - rcsl/code-review
7
+ - " ** "
8
8
9
9
# Add permissions needed to comment on PRs
10
10
permissions :
@@ -204,8 +204,7 @@ jobs:
204
204
205
205
- name : Analyze diff with LLM
206
206
env :
207
- PORTKEY_API_KEY : ${{ secrets.PORTKEY_API_KEY }}
208
- PORTKEY_VIRTUAL_KEY_GOOGLE : ${{ secrets.PORTKEY_VIRTUAL_KEY_GOOGLE }}
207
+ CODE_REVIEW_GEMINI_API_KEY : ${{ secrets.CODE_REVIEW_GEMINI_API_KEY }}
209
208
GITHUB_REPOSITORY : ${{ github.repository }}
210
209
PR_NUMBER : ${{ github.event.pull_request.number }}
211
210
PR_TITLE : ${{ github.event.pull_request.title }}
@@ -219,8 +218,11 @@ jobs:
219
218
const fs = require('fs');
220
219
const analysis = fs.readFileSync('llm_analysis.md', 'utf8');
221
220
221
+ // Get the PR number from the event
222
+ const prNumber = ${{ github.event.pull_request.number }};
223
+
222
224
github.rest.issues.createComment({
223
- issue_number: context.issue.number ,
225
+ issue_number: prNumber ,
224
226
owner: context.repo.owner,
225
227
repo: context.repo.repo,
226
228
body: `## LLM Analysis of PR Changes\n\n${analysis}`
0 commit comments