Grant secure-checkout pull-request write access - #120
Merged
kevinAlbs merged 1 commit intoAug 20, 2026
Merged
Conversation
The README documents that secure-checkout "will write the secure global variable GH_TOKEN that can be used with the gh cli", but the token is minted with `permission-contents: write` only. create-github-app-token treats any permission-* input as an allowlist, so the token has no pull_requests access and any `gh pr` call fails with "Resource not accessible by integration". This broke PR creation in every merge-up workflow using secure-checkout (mongo-php-library, mongo-php-driver, laravel-mongodb, mongo-go-driver) since the permission was added in mongodb-labs#110. Release workflows were unaffected because releases fall under the contents permission, so the breakage went unnoticed.
GromNaN
approved these changes
Aug 20, 2026
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.
secure-checkoutdocuments:A recent change added
permission-contents: writetosecure-checkout. I expect that reduced the permissions of the created token. This permission changes appears to have broken workflows that try to create a PR: https://github.com/mongodb/mongo-php-library/actions/runs/32268117090. This appears to affect workflows in PHP and Go.I expect we can fix this in affected workflows by creating a separate token. But since this is used by PHP and Go projects, and the README documents using the token for
gh, I expect this may more appropriately fixed here.To test: I used a temporary branch to run the workflow from my fork, which successfully drafted a PR.