`gh pr edit --title` fails when a team reviewer is inaccessible to the token
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
- #14315 de @timrogers — fechado sem integrar
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 68/100
Direção de pesquisa
Comece pelo comando gh pr edit e rastreie a busca inicial da pull request antes da mutação PullRequestUpdate. Use a reprodução fornecida com um reviewer de equipe e um token limitado para verificar que a substituição do título não lê mais reviewRequests, enquanto a atualização continua sendo concluída. Está concluído quando o título muda sem o erro de reviewer proibido e os testes existentes passam.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
gh pr edit --title can fail before performing the update because its initial pull request lookup fetches reviewRequests even though the current reviewers are not needed to replace the title.
This is reproducible when the pull request has a requested team reviewer and the token can update pull requests but cannot resolve that reviewer. The GraphQL response contains the pull request data plus a FORBIDDEN error at:
repository.pullRequest.reviewRequests.nodes.0.requestedReviewer
This is the same general over-fetching problem previously reported in #8784 for projectCards, but the reviewer path remains reproducible in the latest release.
Affected version
gh version 2.99.0 (2026-09-01)
https://github.com/cli/cli/releases/tag/v2.99.0
Steps to reproduce the behavior
-
Use a token that has permission to write pull requests in an organization repository but cannot resolve a requested team reviewer.
-
Choose a pull request authored by the authenticated user that has a team review request.
-
Run:
GH_TOKEN="$TOKEN" gh pr edit <number> --repo <owner/repo> --title "<current title>" -
Observe that the command exits before updating the pull request.
I also reproduced this with GH_DEBUG=api. The lookup requested reviewRequests(first: 100) and attempted to resolve user, bot, team, and team organization details.
Expected vs actual behavior
Expected: replacing the title should require only enough pull request data to identify the pull request and print its URL. The command should perform the update without reading reviewers.
Actual: the command exits non-zero while resolving an unrelated team reviewer:
GraphQL: Resource not accessible by personal access token (repository.pullRequest.reviewRequests.nodes.0.requestedReviewer)
A query for only the pull request id and url succeeds with the same token. A locally patched build that uses that minimal lookup also completes the real PullRequestUpdate mutation end to end.
Logs
The sanitized GraphQL error is:
{
"type": "FORBIDDEN",
"path": [
"repository",
"pullRequest",
"reviewRequests",
"nodes",
0,
"requestedReviewer"
],
"extensions": {
"saml_failure": false
},
"locations": [
{
"line": 1,
"column": 211
}
],
"message": "Resource not accessible by personal access token"
}
Repository and pull request details have been omitted because the reproduction used a private organization repository.
- Linguagem predominante
- Go
- Estrelas
- 46.7k
- Forks
- 9.2k
- Merge médio
- 3d 15h
- PRs com merge (30d)
- 56
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cli/cli
-
docs: clarify gh api -f vs -F and @-file expansion in the gh skillTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertaenhancement
Dificuldade 2/5 Meio dia Facilidade para iniciantes 62/100
cli/cli#14701 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
`gh skill update` help incorrectly promises to preserve locally added filesTalvez já em andamento @rajpreetcodes assumiu há 6 dias. Abertabug gh-skill priority-3
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
cli/cli#14647 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
`gh` skill description does not tell agents when to use it, so it is skipped for tasks it coversTalvez já em andamento @littfed assumiu há 11 dias. Abertaenhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
cli/cli#14621 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
gh pr close --comment silently discards the comment when PR is already closed or mergedTalvez livre de novo @bunnysayzz assumiu há 43 dias e não há nenhum pull request aberto. Abertabug gh-pr priority-2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
cli/cli#14374 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
gh pr checks reports a re-queued check run with the previous run's conclusion and exits 0Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug gh-pr priority-2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
cli/cli#14371 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Rafaeldelinares/gentle-mesh#125 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Gentleman-Programming/gentle-ai#5643 ·
Mantenedores costumam responder em até 1 dia
-
security
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
FootprintAI/Containarium#2869 ·
Mantenedores costumam responder em até 1 dia
-
kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
kubevirt/kubevirt#19559 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
bug raised-by:verifier
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
medici-finance/assay#3817 ·
Mantenedores costumam responder em até 1 dia