Skip to content

Commit 6e50fb6

Browse files
fix(ci): trigger auto-approve on Copilot review submission
Add pull_request_review trigger so auto-approve runs when Copilot finishes reviewing, even if it completes after check runs finish. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 356add1 commit 6e50fb6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/auto-approve.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
workflow_run:
99
workflows: ["PR Tests"]
1010
types: [completed]
11+
# Trigger when Copilot (or any reviewer) submits a review
12+
pull_request_review:
13+
types: [submitted]
1114

1215
permissions: read-all
1316

@@ -17,7 +20,8 @@ jobs:
1720
# Only run on pull requests, not pushes
1821
if: |
1922
github.event.check_suite.pull_requests[0] != null ||
20-
github.event.workflow_run.pull_requests[0] != null
23+
github.event.workflow_run.pull_requests[0] != null ||
24+
github.event.pull_request != null
2125
permissions:
2226
pull-requests: write
2327

@@ -27,6 +31,8 @@ jobs:
2731
run: |
2832
if [ "${{ github.event_name }}" == "check_suite" ]; then
2933
PR_NUMBER="${{ github.event.check_suite.pull_requests[0].number }}"
34+
elif [ "${{ github.event_name }}" == "pull_request_review" ]; then
35+
PR_NUMBER="${{ github.event.pull_request.number }}"
3036
else
3137
PR_NUMBER="${{ github.event.workflow_run.pull_requests[0].number }}"
3238
fi

0 commit comments

Comments
 (0)