You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh pr edit does not work with only pull-requests: write permissions #6274
where the CLI tries to get the project names, but this requires the repository-projects: read permission.
Adding repository-projects: read fixes the problem, but this took me a while to figure out and should be fixed IMO, since edits to a PR that don't involve projects shouldn't require that permission.
I am using the latest CLI version as intalled in the ubuntu-latest GitHub Actions image.
Steps to reproduce the behavior
Create a workflow with only pull-requests: write permissions
Create a step that runs gh pr edit ...
See error
Expected vs actual behavior
The gh pr edit command should succeed without additional permissions.
Reacted by Scott Dickerson, Lahiru, Itay Podhajcer, sainu, pakrym-stripe, Billie Thompson, Alex Burgel, Masafumi Koba, Louis-Guillaume Durand, Krzysztof Pyrzyk and 66 more
The workaround that @nzig came up with worked well until today:
permissions:
packages: write # needed for push of package
contents: write # needed for push of tags
pull-requests: read # needed to view the PR for the slack
repository-projects: read # needed for view the PR for the slack https://github.com/cli/cli/issues/6274
However, it seems to be newly broken again today:
GraphQL: Resource not accessible by integration (repository.pullRequest.statusCheckRollup.nodes.0.commit.statusCheckRollup)
I added gh pr edit to my script today and got the Resource not accessible by integration error. Stumbled onto this page on Googling. It's been ~1 year since this issue was opened. :( Hope this gets some traction soon.
Reacted by Jonathan Hernandez, Mike Havrilla, Stian Steinbakken, Frank, Adam Jędryka, Jean-Bernard Ratté, Daniel Kim, Shinebayar G, Konrad Jamrozik, Yuta Kasai and 16 more
Im having this issue as well - anyone got it working with GitHub App ? is there any particular permission needs to be added besides PullRequest (read and write) and repository(read and write)?
However, it seems to be newly broken again today:
GraphQL: Resource not accessible by integration (repository.pullRequest.statusCheckRollup.nodes.0.commit.statusCheckRollup)
I ran into this error when using gh pr list ..., and was able to resolve it by adding statuses and checks permissions to my job, e.g.
permissions:
pull-requests: readstatuses: readchecks: read# you might need even more permissions, depending on what you're doing 😄
Faced this exact issue when trying to edit PT title using our Github bot. Took a long time to figure out that we need to give extra project:read permission to the bot to perform this simple task.
It would be a great help if this gets fixed!
Activity
mislav commentedon Sep 15, 2022
Thank you for reporting! Fully agreed with your assessment of the bug.
Semi-related: #4631 #4876
scottdickerson commentedon Oct 20, 2022
The workaround that @nzig came up with worked well until today:
However, it seems to be newly broken again today:
Bikram-DoorDash commentedon Aug 30, 2023
I added
gh pr editto my script today and got theResource not accessible by integrationerror. Stumbled onto this page on Googling. It's been ~1 year since this issue was opened. :( Hope this gets some traction soon.danielkimuipath commentedon Oct 4, 2023
Im having this issue as well - anyone got it working with GitHub App ? is there any particular permission needs to be added besides PullRequest (read and write) and repository(read and write)?
jenseng commentedon Oct 4, 2023
I ran into this error when using
gh pr list ..., and was able to resolve it by addingstatusesandcheckspermissions to my job, e.g.Attempt to fix the pr MergeRequested workflow
Attempt to fix the pr MergeRequested workflow (#26157)
Attempt to fix the pr MergeRequested workflow (#26157)
vyas-n commentedon May 13, 2024
Seems to have the same problem even outside of github actions workflows: https://github.com/orgs/community/discussions/111324
siddhantsoni commentedon May 31, 2024
Faced this exact issue when trying to edit PT title using our Github bot. Took a long time to figure out that we need to give extra
project:readpermission to the bot to perform this simple task.It would be a great help if this gets fixed!
19 remaining items
fix: label Dependabot PRs via the labels endpoint, not gh pr edit
fix: label Dependabot PRs via the labels endpoint, not gh pr edit
fix: label Dependabot PRs via the labels endpoint, not gh pr edit
fix: label Dependabot PRs via the labels endpoint, not gh pr edit
fix: label Dependabot PRs via the labels endpoint, not gh pr edit
fix: label Dependabot PRs via the labels endpoint, not gh pr edit (#40)
chore: group Dependabot updates and auto-merge safe ones (#8)
chore: group Dependabot updates and auto-merge safe ones (#39)
chore: group Dependabot updates and auto-merge safe ones (#64)
chore: group Dependabot updates and auto-merge safe ones (#16)
chore: group Dependabot updates and auto-merge safe ones (#24)
chore: group Dependabot updates and auto-merge safe ones (#31)
chore: group Dependabot updates and auto-merge safe ones (#92)
chore: group Dependabot updates and auto-merge safe ones (#7)
gha: fix permissions of update label backport PR workflow