Skip to content

fix(.claude/CLAUDE.md): instruct how to confirm the Copilot review request landed - #11235

Open
basvandijk wants to merge 5 commits into
masterfrom
bas/claude-md-confirm-copilot-review
Open

fix(.claude/CLAUDE.md): instruct how to confirm the Copilot review request landed#11235
basvandijk wants to merge 5 commits into
masterfrom
bas/claude-md-confirm-copilot-review

Conversation

@basvandijk

@basvandijk basvandijk commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

.claude/CLAUDE.md instructs 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.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_requested events.
  • Document why requested_reviewers / gh pr view --json reviewRequests are 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.

Comment thread .claude/CLAUDE.md
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --jq expression 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 all review_requested events, 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-reviewer failing 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.

@basvandijk basvandijk changed the title docs: say how to confirm the Copilot review request landed fix(.claude/CLAUDE.md ): instruct how to confirm the Copilot review request landed Aug 20, 2026
@basvandijk basvandijk changed the title fix(.claude/CLAUDE.md ): instruct how to confirm the Copilot review request landed fix(.claude/CLAUDE.md): instruct how to confirm the Copilot review request landed Aug 20, 2026
@github-actions github-actions Bot added fix and removed docs labels Aug 20, 2026
@basvandijk
basvandijk marked this pull request as ready for review August 20, 2026 12:40
@basvandijk
basvandijk requested a review from a team as a code owner August 20, 2026 12:40
@basvandijk
basvandijk enabled auto-merge August 20, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants