XS✔ ◾ Fix Dependabot auto-merge permissions#815
Merged
Conversation
PR Metrics✔ Thanks for keeping your pull request small.
Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in Dependabot auto-merge by expanding the GitHub App token permissions from pull_requests:write alone to also include contents:write and workflows:write. After tokens were scoped to least privilege per job, the auto-merge step lacked the access needed to schedule a merge (contents:write) and to merge PRs that modify workflow files (workflows:write), which all Dependabot PRs in this repo do.
Changes:
- Added
contents:writeandworkflows:writeto the minted GitHub App token permissions for the Dependabot auto-merge job, alongside the existingpull_requests:write.
neilr81
approved these changes
Jun 11, 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.
Purpose
Auto-merge for Dependabot pull requests regressed after GitHub App tokens were scoped to least privilege per job. The token that enables auto-merge no longer carried the access needed to schedule a merge or to update workflow files, so it failed with a permissions error.
Impact
Dependabot pull requests can be auto-merged again. Every Dependabot update in this repository targets GitHub Actions and therefore modifies workflow files, so the auto-merge token now also requests the corresponding access. This relies on the matching Workflows permission being granted on the GitHub App installation.