Repository navigation
Align the Dependabot PR token note with the troubleshooting article - #46513
Conversation
The reusable states that workflow runs triggered by Dependabot pull requests "run as if they are from a forked repository" with a read-only GITHUB_TOKEN that "cannot access any secrets". This contradicts the Dependabot troubleshooting article, which states that the permissions key can increase the token's access, and the "Permissions for forked repositories" section on the same workflow-syntax reference page, which scopes the write-to-read downgrade to pull requests from forked repositories only. It also contradicts the Dependabot/fetch-metadata README, whose auto-approving example relies on this exact pattern. Follow-up to github#37657, which addressed other parts of this contradiction.
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
|
Thanks @Marrrrrrrrry, this will be reviewed by the appropriate team |
mchammer01
left a comment
There was a problem hiding this comment.
@Marrrrrrrrry 👋🏻 - thanks for noticing the discrepancy in our documentation, and for fixing it ✨
LGTM, made a minor suggestion that I'm going to apply before merging.
|
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
The
workflow-runs-dependabot-notereusable (rendered on the workflow-syntax reference page under "Permissions for workflow runs triggered by Dependabot") states that Dependabot-triggered workflow runs "run as if they are from a forked repository, and therefore use a read-only GITHUB_TOKEN" and "cannot access any secrets".This contradicts two other official sources:
permissionskey in your workflow to increase the access for the token."dependabot/fetch-metadataREADME maintained by GitHub (https://github.com/dependabot/fetch-metadata), whose "Auto-approving" example relies on exactly this pattern (pull_request+pull-requests: write).Following the reusable as written would make readers conclude that the documented auto-approval pattern is impossible.
What changes are you making?
Rewrite the reusable to match the troubleshooting article: Dependabot-triggered runs use a read-only token by default, and the
permissionskey can increase the access. Link to the troubleshooting article for details, keep the link to the secure-use article. One line changed; no other content affected.Follow-up to #37657, which fixed other parts of this contradiction but left this reusable unchanged.
Validation:
mainas of 2026-10-28; the replacement text closely paraphrases the troubleshooting article's "Changing GITHUB_TOKEN permissions" section.git grepsweep overcontent/anddata/: the stale claim exists in exactly one place onmain(this reusable), the reusable renders on exactly one page (the workflow-syntax reference), and no occurrence remains after the change — the one-line edit covers the entire contradiction.permissionskey) is sourced from the troubleshooting article and the fetch-metadata README; no runtime test was performed as part of this docs change.