Skip to content

Fix failing "Request Copilot review" CI job#4457

Merged
matthew-dean merged 2 commits into
masterfrom
copilot/fix-request-copilot-review-job
Jun 20, 2026
Merged

Fix failing "Request Copilot review" CI job#4457
matthew-dean merged 2 commits into
masterfrom
copilot/fix-request-copilot-review-job

Conversation

Copilot AI commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

The copilot-review job was unconditionally failing because gh api exits non-zero on any API error. The runner was granting only PullRequests: read despite the job declaring permissions: pull-requests: write — a known behaviour when repo/org enforces read-only GITHUB_TOKEN defaults. This caused a 403 to bubble up as a job failure.

Changes

  • .github/workflows/ci.yml — append || echo "::warning::..." to the gh api call so the step exits cleanly on permission errors while still emitting a visible workflow annotation. Aligns the step behaviour with the continue-on-error: true already on the job.
- -f "reviewers[]=copilot-pull-request-reviewer"
+ -f "reviewers[]=copilot-pull-request-reviewer" \
+ || echo "::warning::Could not request Copilot review (the token may lack pull-requests: write access, or Copilot PR reviews may not be enabled for this repository)"

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Request Copilot review Fix failing "Request Copilot review" CI job Jun 20, 2026
Copilot AI requested a review from matthew-dean June 20, 2026 21:59
@matthew-dean matthew-dean marked this pull request as ready for review June 20, 2026 22:00
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 20, 2026
@matthew-dean matthew-dean merged commit 91b2919 into master Jun 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants