microsoft / microsoft/fluentui
dependabot-rollup: add opt-in approve and auto-merge for individually safe updates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 46
Description
Context
PR #36589 added the assign-prs skill. Its first revision also classified, approved and merged individually safe Dependabot PRs. That workstream was removed in review — assign-prs is now assignment-only, and dependency updates belong to dependabot-rollup.
dependabot-rollup today combines compatible updates into a rollup branch and opens a draft PR, explicitly leaving the original PRs untouched. This issue tracks adding the removed capability there instead, as an opt-in: approve and merge Dependabot PRs that are individually safe, without building a rollup.
This is deliberately conservative — the cost of a wrong merge is far higher than the cost of leaving a PR for a human.
Safety conditions
A PR is safe only when all of these hold. Default to unsafe.
- Author is Dependabot. The two APIs spell this differently:
search/issuesreturnsdependabot[bot],gh pr view --json authorreturnsapp/dependabot. Comparing thegh pr viewvalue againstdependabot[bot]marks every Dependabot PR unsafe and yields an empty safe list — a bug that looks like a conservative result. Match either spelling. - Patch or minor only. Parse
bump <dep> from <version> to <version>, stripping anychore(deps):/chore(deps-dev):prefix. Target major must equal source major. Exclude anything unparseable rather than guessing. - Non-empty diff.
changedFiles > 0. A bump followed by a corrective commit can net to zero changed files against the base, which passes every other rule here — including "no workflow files touched", trivially true when no files are touched. Close such a PR instead; Dependabot re-raises it if it still applies. - No workflow files touched. Anything under
.github/workflows/**is out of scope regardless of semver: it alters CI execution and is a supply-chain surface. - Every check affirmatively passed. See below — this is the subtle one.
- Cleanly mergeable.
mergeable == MERGEABLE. ExcludeCONFLICTINGandDIRTY.UNKNOWNmeans GitHub hasn't finished computing merge state: re-poll once, then exclude.
The check-verification trap
Credit to @paolo-aliprandi, who caught this in review of #36589 (comment).
The original rule was a negative list: reject any entry in statusCheckRollup whose conclusion is FAILURE, TIMED_OUT, CANCELLED or ACTION_REQUIRED. That does not establish that anything passed:
- an empty
statusCheckRollupsatisfies it vacuously; - a rollup containing only neutral or skipped conclusions also satisfies it.
Once the skill adds its own approval, gh pr merge --auto will then merge as soon as nothing blocks — so a PR with no checks at all is the easiest one to auto-merge, which is exactly backwards.
Any implementation must instead:
- require a non-empty rollup;
- affirmatively verify that every relevant check concluded
SUCCESS; - treat neutral/skipped as unproven, not passing;
- treat still-running checks as not-yet-safe and re-check later rather than merging optimistically;
- re-verify immediately before merging, since status changes between planning and execution.
Note that mergeStateStatus == BLOCKED on its own is expected and is not a disqualifier — it usually means only that the required approval hasn't been given yet, which is the approval being added.
Guardrails to carry over
- Dry-run and explicit approval before approving or merging anything.
- Never approve or merge a PR not authored by Dependabot.
- Never merge a semver-major update, or any PR touching
.github/workflows/**. - Never bypass branch protection or use an administrator merge override.
- Never merge with a failing, cancelled, timed-out, or still-running required check.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the dependabot-rollup skill and compare it with the assignment-only assign-prs work from PR #36589. Read the search/issues and gh pr view data paths, including statusCheckRollup, mergeable, changedFiles, and workflow-file detection. Done means opt-in dry-run and approval guardrails safely approve and auto-merge only individually safe Dependabot updates after checks are re-verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions
- Domain
- ci-cd, devops, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100