Skip to content

Commit c8f5aa5

Browse files
authored
NO-JIRA: ci(gha): fix gemini-pr-review.yml to handle pull_request_target trigger and add instructions for non-comment triggers (#1492)
1 parent 90f6d3d commit c8f5aa5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ jobs:
9090
app-id: '${{ vars.APP_ID }}'
9191
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
9292

93-
- name: 'Get PR details (pull_request & workflow_dispatch)'
93+
- name: 'Get PR details (pull_request & pull_request_target & workflow_dispatch)'
9494
id: 'get_pr'
9595
if: |-
96-
${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
96+
${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' }}
9797
env:
9898
GITHUB_TOKEN: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
9999
EVENT_NAME: '${{ github.event_name }}'
@@ -110,6 +110,9 @@ jobs:
110110
111111
echo "pr_number=${PR_NUMBER}" >> "${GITHUB_OUTPUT}"
112112
113+
# No additional instructions for non-comment triggers
114+
echo "additional_instructions=" >> "${GITHUB_OUTPUT}"
115+
113116
# Get PR details
114117
PR_DATA="$(gh pr view "${PR_NUMBER}" --json title,body,additions,deletions,changedFiles,baseRefName,headRefName)"
115118
echo "pr_data=${PR_DATA}" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)