Skip to content

docs(pr-review-agent): document read:org requirement for team review requests#205

Merged
don-petry merged 3 commits into
mainfrom
docs/pat-members-read-permission
May 16, 2026
Merged

docs(pr-review-agent): document read:org requirement for team review requests#205
don-petry merged 3 commits into
mainfrom
docs/pat-members-read-permission

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Summary

Closes the documentation gap exposed by run #25974874120 / job #76353169023.

The reviewRequests.requestedReviewer GraphQL field returns Resource not accessible by personal access token when a PR has a team (not just a user) as a requested reviewer and the PAT lacks read:org. This was previously undocumented — read:org was described only as silencing a log warning and enabling CODEOWNERS escalation, not as a hard requirement for the metadata prefetch.

The failure was latent since be66351c tightened prefetch error handling (silent {} → hard exit on May 15), and surfaced when petry-projects/.github#302 became the first team-reviewer PR encountered since then.

Changes

File Change
bot-setup.md Strengthen read:org scope description; add troubleshooting entry for the prefetch error
machine-user-setup.md Strengthen read:org scope description; expand missing-scope troubleshooting to cover both failure modes
setup.md Tighten existing scope note; add dedicated troubleshooting entry for the reviewRequests prefetch error

…requests

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 16, 2026 22:53
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 54 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 00fea879-cb78-464a-a0fe-bb105a8934d9

📥 Commits

Reviewing files that changed from the base of the PR and between 5bd169b and 3e67037.

📒 Files selected for processing (3)
  • docs/pr-review-agent/bot-setup.md
  • docs/pr-review-agent/machine-user-setup.md
  • docs/pr-review-agent/setup.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/pat-members-read-permission

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation across several setup guides (bot-setup.md, machine-user-setup.md, and setup.md) to clarify that the read:org scope is mandatory for Personal Access Tokens when handling team-based review requests. It also adds troubleshooting sections for the specific GraphQL error encountered when this scope is missing. Feedback was provided to improve the specificity of error paths in headers and to ensure consistent casing for internal documentation links.

Comment thread docs/pr-review-agent/setup.md Outdated
Comment thread docs/pr-review-agent/setup.md Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

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 PR Review Agent setup docs to clarify that the read:org scope is a hard requirement when a PR has a team requested reviewer (to avoid GraphQL prefetch failures), and adds targeted troubleshooting guidance for the associated reviewRequests.requestedReviewer permission error.

Changes:

  • Expanded read:org scope explanations to cover team-based review request visibility (not just CODEOWNERS escalation).
  • Added troubleshooting sections for gh pr view failed during metadata prefetch / GraphQL reviewRequests permission errors.
  • Refined existing missing-scope troubleshooting to cover both warning-only and hard-failure modes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/pr-review-agent/setup.md Adds explicit read:org requirement language and a new troubleshooting entry for metadata prefetch failures.
docs/pr-review-agent/machine-user-setup.md Strengthens read:org scope description and expands troubleshooting to explain both failure modes.
docs/pr-review-agent/bot-setup.md Updates scope guidance and adds a troubleshooting entry for the reviewRequests prefetch permission error.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/pr-review-agent/setup.md Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry don-petry enabled auto-merge (squash) May 16, 2026 23:00
Use full GraphQL error path for metadata prefetch troubleshooting and
fix BOT_SETUP link target to the actual lowercase filename.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry don-petry merged commit b5cc136 into main May 16, 2026
16 checks passed
@don-petry don-petry deleted the docs/pat-members-read-permission branch May 16, 2026 23:02
don-petry added a commit that referenced this pull request Jun 7, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 7, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 8, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 12, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…requests (#205)

The `reviewRequests.requestedReviewer` GraphQL field returns
'Resource not accessible by personal access token' when a PR has a
team (not just a user) as a requested reviewer and the PAT lacks
`read:org`. Previously documented only as silencing a log warning
and enabling CODEOWNERS escalation — the hard prefetch failure on
team-reviewer PRs was undocumented.

Discovered in run #25974874120 / job #76353169023 against
petry-projects/.github#302 (first PR with a team reviewer encountered
since be66351 tightened prefetch error handling from silent `{}` to
hard exit).

Changes:
- bot-setup.md: strengthen read:org description; add troubleshooting
  entry for the prefetch error
- machine-user-setup.md: strengthen read:org description; expand
  Missing-token-scopes troubleshooting entry to cover both failure modes
- setup.md: tighten existing scope note; add dedicated troubleshooting
  entry for the prefetch/reviewRequests error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants