Conversation
…d start (#295) Closes #294. ## Problem The headless Copilot-review loop needs the Copilot reviewer's bot node id to drive round 1 via the `requestReviews` mutation. On a **cold-start PR** - freshly opened, auto-review-on-open not yet landed, so **no formal review and no issue comment on the PR yet** - the runbook's only documented source for that id was **manual UI seeding**, which defeats a headless/cron run. Surfaced running the loop fully headless on `ptr727/HomeAssistant-Config` PR #7. ## Fix The Copilot reviewer's bot node id is the reviewer bot *account's* node id and is **stable repo-wide**. Verified empirically - identical across every recent PR in two repos: ``` HomeAssistant-Config -> BOT_kgDOCnlnWA ProjectTemplate -> BOT_kgDOCnlnWA ``` So document reading the id from **any prior Copilot review anywhere in the repo** as the preferred cold-start fallback (a `pullRequests(last:20)` GraphQL query), positioned **before** UI seeding. UI seeding drops to a true last resort: only a repo that has never had a Copilot review at all, where no prior id exists to read. Doc-only change to `.github/copilot-instructions.md`; the `requestReviews` mutation itself is unchanged. markdownlint + cspell clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR promotes the current develop snapshot to main, carrying forward documentation updates to the GitHub Copilot headless review runbook to better support cold-start scenarios where the Copilot reviewer bot node id is not yet available on the current PR.
Changes:
- Document a repo-wide fallback to discover the Copilot reviewer bot node id from recent PR reviews, to avoid UI seeding on cold-start PRs.
- Add a guardrail to stop the script early when
$BOT_IDis empty to avoid callingrequestReviewswith an invalid id.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Promotes the current
developsnapshot tomain.Changes
pullRequests(first: 20, orderBy: { field: CREATED_AT, direction: DESC })) as the preferred cold-start fallback, before UI seeding. Closes copilot-instructions: document headless bot-node-id bootstrap (avoid UI-seeding fallback on cold start) #294.Doc-only;
.github/copilot-instructions.md. Already reviewed clean by Copilot and merged todevelop.🤖 Generated with Claude Code