Skip to content

XS✔ ◾ Fix Dependabot auto-merge permissions#815

Merged
muiriswoulfe merged 1 commit into
mainfrom
fix-dependabot-auto-merge-permissions
Jun 11, 2026
Merged

XS✔ ◾ Fix Dependabot auto-merge permissions#815
muiriswoulfe merged 1 commit into
mainfrom
fix-dependabot-auto-merge-permissions

Conversation

@muiriswoulfe

Copy link
Copy Markdown
Member

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.

@microsoft-pr-metrics

Copy link
Copy Markdown

PR Metrics

Thanks for keeping your pull request small.
Thanks for adding tests.

Lines
Product Code -
Test Code -
Subtotal -
Ignored Code 1
Total 1

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@microsoft-pr-metrics microsoft-pr-metrics Bot changed the title Fix Dependabot auto-merge permissions XS✔ ◾ Fix Dependabot auto-merge permissions Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:write and workflows:write to the minted GitHub App token permissions for the Dependabot auto-merge job, alongside the existing pull_requests:write.

@muiriswoulfe muiriswoulfe enabled auto-merge (squash) June 11, 2026 14:14
@muiriswoulfe muiriswoulfe merged commit 253f915 into main Jun 11, 2026
36 checks passed
@muiriswoulfe muiriswoulfe deleted the fix-dependabot-auto-merge-permissions branch June 11, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants