Skip to content

ci: auto-approve Dependabot non-major bumps before auto-merge#615

Merged
nolik merged 1 commit into
mainfrom
ci/dependabot-auto-approve
Jul 25, 2026
Merged

ci: auto-approve Dependabot non-major bumps before auto-merge#615
nolik merged 1 commit into
mainfrom
ci/dependabot-auto-approve

Conversation

@nolik

@nolik nolik commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Implements "human PRs gated by review, Dependabot flows through automatically."

Workflow change: the Dependabot auto-merge job now runs gh pr review --approve before enabling auto-merge, for non-major bumps only. The bot's approval satisfies the require-1-review rule for Dependabot's own PRs; human PRs get no such approval and still need a human reviewer. Major bumps are neither approved nor auto-merged (a human reviews + merges them).

Companion branch-protection changes (applied after this merges):

  • Required approvals: 0 → 1 (gates all PRs, incl. human).
  • Remove the single-user push restriction on main — otherwise the Actions token still can't merge even after approving (this was the enablePullRequestAutoMerge "not authorized" error). main remains protected by the required review + the 4 required checks.

Already in place: "Allow GitHub Actions to approve PRs" (can_approve_pull_request_reviews: true); dismiss_stale_reviews: false (so the bot's approval survives Dependabot rebases).

Note: enforce_admins stays off, so admins still bypass — human-PR review is enforced for non-admins.

🤖 Generated with Claude Code

Adds a `gh pr review --approve` step so Dependabot's own patch/minor PRs
satisfy the branch's require-1-review rule automatically, then enable
auto-merge as before. Human PRs get no bot approval and still need a
human reviewer. Major bumps are neither approved nor auto-merged.

Pairs with branch-protection changes: required approvals set to 1 and
the single-user push restriction removed so the Actions token can merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nolik
nolik merged commit cf3fed8 into main Jul 25, 2026
8 checks passed
@nolik
nolik deleted the ci/dependabot-auto-approve branch July 25, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant