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 ready doesn't work with GitHub Actions' GITHUB_TOKEN secret #8910
Thanks, I don't see any obvious reason why this wouldn't work. Will need to investigate when we have time. In the meantime you'll need to use a PAT. Thanks for the report and the reproduction.
The PR was created via a cli in a github cron by github-actions [bot]. The cron does a workflow_dispatch to a worfklow which eventually tried to pass the PR as ready.
Activity
williammartin commentedon Apr 2, 2024
What is
$GITHUB_REPOSITORYset to? I don't see it configured anywhere.suzuki-shunsuke commentedon Apr 2, 2024
https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
$GITHUB_REPOSITORYis a GitHub Actions' default environment variable.williammartin commentedon Apr 2, 2024
Thanks, I don't see any obvious reason why this wouldn't work. Will need to investigate when we have time. In the meantime you'll need to use a
PAT. Thanks for the report and the reproduction.alth-ansys commentedon Feb 17, 2026
Hey,
I was facing the same issue in our repo.
The PR was created via a cli in a github cron by
github-actions [bot]. The cron does aworkflow_dispatchto a worfklow which eventually tried to pass the PR as ready.The job was in essence like this:
Running this triggered
API call failed: GraphQL: Resource not accessible by integration (markPullRequestReadyForReview)Similar output when trying to pass a ready PR to draft
gh pr ready PR_NUMBER --undo:API call failed: GraphQL: Resource not accessible by integration (convertPullRequestToDraft)It was slightly surprising but changing the
contentspermissions towritemade theghcommand succeed.Set contents:write permission as indicated by cli/cli#8910
Fix workflows failing when trying to set draft status (#2589)
Fix workflows failing when trying to set draft status (#2589)
Drop `contents: write` from the Copilot review workflow
Add permission so that PR can be converted to draft
Add permission so that PR can be converted to draft
Squashed commit of the following:
fix(ci): basbytesvakten får contents: write för draft-konvertering
fix(ci): basbytesvakt och preview-push avbryter inte veckans dossier-…
Review posting: formal-review fallback token; contents:write for gh p…
fix(batch-run): give result-pr-checks the permission draft conversion…