fix(.claude/CLAUDE.md): instruct how to confirm the Copilot review request landed - #11235
fix(.claude/CLAUDE.md): instruct how to confirm the Copilot review request landed#11235basvandijk wants to merge 5 commits into
Conversation
The instruction to request a Copilot review had no matching instruction for checking that it worked, and the obvious check gives the wrong answer: neither `gh api .../requested_reviewers` nor `gh pr view --json reviewRequests` reports the bot, because that endpoint returns only `.users[]` and `.teams[]` and Copilot is a `Bot` actor. A successful request therefore reads back as an empty list, which invites retrying a POST that is idempotent and then concluding the whole thing is broken. Point at the issue timeline's `review_requested` event instead, and record the two dead ends: draft status does not block the request, and `gh pr edit --add-reviewer` cannot resolve the bot login because it goes through GraphQL. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the contributor guidance for requesting a GitHub Copilot review by documenting a reliable way to verify that the review request actually landed, avoiding misleading “empty reviewer list” checks.
Changes:
- Add instructions to confirm Copilot review requests via the issue timeline’s
review_requestedevents. - Document why
requested_reviewers/gh pr view --json reviewRequestsare misleading for bot reviewers, and note two common dead ends.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The dead ends I hit while debugging (draft status, `gh pr edit` going through GraphQL) are not things a reader needs. Keep only the trap that makes the positive instruction worth stating: the check you would naturally reach for after the POST returns a false negative. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The bot has two logins depending on the endpoint: the timeline's `requested_reviewer.login` is `Copilot`, while the reviews API reports the author as `copilot-pull-request-reviewer[bot]` — the name you pass to the request. Show the expected output so the mismatch cannot read as a failure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.claude/CLAUDE.md:122
- The text says to look for an event naming
Copilot, but the--jqexpression prints.requested_reviewer.login, which will be the bot login (e.g.copilot-pull-request-reviewer[bot]) rather than the display name "Copilot". This also prints allreview_requestedevents, including humans/teams, which makes the verification step noisy.
To confirm the request landed, check the issue timeline for a `review_requested`
event naming `Copilot`:
gh api repos/dfinity/ic/issues/<PULL_REQUEST_NUMBER>/timeline --paginate
--jq '.[] | select(.event == "review_requested") | "(.created_at) (.requested_reviewer.login // .requested_team.name)"'
**.claude/CLAUDE.md:126**
* PR description says this doc should also record two dead ends (draft status not blocking the request, and `gh pr edit --add-reviewer` failing to resolve the bot login), but those points aren’t currently captured in the updated instructions. Either add them here or adjust the PR description to match the change.
names the bot Copilot, not the copilot-pull-request-reviewer[bot] you posted.
</details>
Effort level cannot be set per request: the REST body takes only `reviewers` and `team_reviewers`, and nothing in the GraphQL schema mentions effort. It is a repository default, configured in the UI and now set to `Balanced`. Record that so nobody goes looking for an API parameter that does not exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
It documented the absence of an API rather than anything anyone does, and the claim about the repository default cannot be verified from the API, so it would go stale silently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.claude/CLAUDE.md:128
- The PR description says this doc should also record two “dead ends” (draft status not blocking the request, and
gh pr edit --add-reviewerfailing because it uses GraphQL). Those details aren’t currently included in the updated instructions, so the change doesn’t fully match the stated intent.
Don't check the requested-reviewers list instead: it reports only users and
teams, and Copilot is a bot, so a request that worked still reads back empty.
.claude/CLAUDE.mdinstructs to request a review from Copilot for any PR it publishes. However it always had trouble confirming whether the request landed. So this adds an instruction how to verify it correctly so it doesn't waste tokens on it.