Skip to content

fix: restrict automatic PR approval and merging to Dependabot - #12402

Merged
Timothee Guerin (timotheeguerin) merged 1 commit into
microsoft:mainfrom
timotheeguerin:fix/dependabot-policy-author-filter
Oct 26, 2026
Merged

Timothee Guerin (timotheeguerin) merged 1 commit into
microsoft:mainfrom
timotheeguerin:fix/dependabot-policy-author-filter

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

The Dependabot policy currently approves and enables auto-merge for human-authored PRs too. For example, the policy approved microsoft/typespec#12395 despite it not being a Dependabot PR.

issueAuthor: true makes the sender condition match the PR author rather than restrict it to the configured bot login. Set it to false so approval, labeling, and auto-merge remain limited to Dependabot PRs targeting main.

Fixes a regression introduced by #12129. Existing approvals, labels, and auto-merge requests are not retroactively removed.

@microsoft-github-policy-service microsoft-github-policy-service Bot 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.

Approved automatically for a Dependabot update.

@microsoft-github-policy-service microsoft-github-policy-service Bot added auto-merge Automatically merge the pull request after all requirements pass eng labels Oct 26, 2026
@timotheeguerin
Timothee Guerin (timotheeguerin) marked this pull request as ready for review October 26, 2026 12:38
Copilot AI balanced review requested due to automatic review settings October 26, 2026 12:38
@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

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.

🟢 Approval recommended

The single-condition fix addresses the reported regression without changing existing safeguards, and no unresolved issues remain.

No open issues 🎉

What changed in this PR

Fixes the policy regression introduced in #12129 by restricting automatic approval, labeling, and auto-merge to Dependabot PRs targeting main.

Changes:

  • Sets issueAuthor: false so sender matching uses the configured dependabot[bot] login.
  • Preserves existing event and branch restrictions; existing approvals, labels, and auto-merge requests remain unchanged.
File Description
.github/​policies/​pr.dependabot-auto-merge.yml Corrects the sender condition to limit automation to Dependabot.

Review effort: Balanced

@azure-sdk-automation

azure-sdk-automation Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Merged via the queue into microsoft:main with commit 9b484f7 Oct 26, 2026
35 checks passed
@timotheeguerin
Timothee Guerin (timotheeguerin) deleted the fix/dependabot-policy-author-filter branch October 26, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Automatically merge the pull request after all requirements pass eng

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants