fix: request Copilot reviews as an unlicensed machine user - #12
Merged
Merged
Conversation
Reviews requested with GITHUB_TOKEN are billed to the PR author, so PRs by people on exhausted personal Copilot plans were refused. Requesting as an org member with no Copilot license bills the organization regardless of author. Callers now pass COPILOT_REVIEW_TOKEN; label removal still uses GITHUB_TOKEN.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review comments remain, and all approval assessments indicate readiness.
Review effort: Lite
Findings: None
What changed in this PR
Updates the reusable Copilot review workflow to use a dedicated unlicensed machine-user PAT for review requests while retaining GITHUB_TOKEN for label removal.
Changes:
- Requires and forwards
COPILOT_REVIEW_TOKEN. - Uses the PAT for Copilot review requests.
- Documents caller setup and security requirements.
| File | Description |
|---|---|
.github/workflows/copilot-review.yml |
Updates workflow authentication, secret handling, and caller instructions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the Copilot review workflow request reviews as an org member that has no Copilot license, using a fine-grained PAT passed in as
COPILOT_REVIEW_TOKEN, instead of asgithub-actions[bot].Reviews requested with
GITHUB_TOKENturned out to be billed to the PR author, so PRs from people whose personal Copilot plan had run out were still refused. A review requested by a user is billed to that user, and for an org member with no Copilot license the org's policy bills the organization. Label removal still usesGITHUB_TOKEN.Callers now need to pass the secret explicitly. The header comment shows the updated caller and lists what the account and its PAT need.
Resolves
N/A
Testing
actionlintpasses. With the previous version, a review requested on a PR authored by a user with no remaining Copilot quota was refused on that user's quota, while one on a Renovate PR went through. After this merges, the scratch-blocks caller will be updated to pass the secret and re-tested on both kinds of PR, then checked in the org's usage report.