Skip to content

ci: auto-merge Dependabot dev-deps minor/patch bumps#55

Merged
g-shevchenko merged 1 commit into
mainfrom
claude/dependabot-auto-merge
May 24, 2026
Merged

ci: auto-merge Dependabot dev-deps minor/patch bumps#55
g-shevchenko merged 1 commit into
mainfrom
claude/dependabot-auto-merge

Conversation

@g-shevchenko

Copy link
Copy Markdown
Owner

Summary

PR #38 sat for 6 days before Dependabot itself rebased it as PR #54 — the
noise that prompted this fix. Dev-only @types/node + typescript
minor/patch bumps across 17 MCP services shouldn't need a human merge
every week; they should auto-merge once CI is green.

Scope (deliberately narrow)

Workflow fires ONLY on PRs from dependabot[bot] and auto-merges ONLY when all of:

  1. dependency-type == direct:development (dev-deps only; production still requires human review)
  2. update-type ∈ {semver-minor, semver-patch} (semver-major still requires human review)
  3. All status checks pass (gh pr merge --auto waits for them)

Anything outside that envelope (production deps, major version bump, CI failure) falls through to the existing manual-review flow.

Repo settings already enabled (via API)

  • allow_auto_merge: true
  • delete_branch_on_merge: true

Security posture

  • pull_request_target is privileged; the workflow guards with TWO checks (github.actor == 'dependabot[bot]' AND pull_request.user.login == 'dependabot[bot]') — both must hold, so a fork PR mis-labelled with Dependabot's username can't trick it.
  • dependabot/fetch-metadata action pinned to full commit SHA d7267f6 (v2.3.0) per OpenSSF Scorecard best practice for third-party actions.
  • Permissions scoped to contents: write + pull-requests: write (minimum for gh pr merge --auto).

Test plan

  • YAML structure validated (workflow name + trigger + permissions + Dependabot guard + fetch-metadata)
  • Identity: Gregory Shevchenko <g@humanswith.ai>, no Claude co-author per public-repo discipline
  • Repo settings (allow_auto_merge, delete_branch_on_merge) confirmed enabled via API
  • Action pinned to commit SHA (Scorecard compliance)

Follow-up signal to watch

Next time Dependabot opens a dev-deps PR: it should auto-merge within ~5 minutes of CI green, no human action needed. If it sits open, the workflow's "Skip (not eligible)" log line in Actions will explain why (e.g. major-version bump). Production-deps Dependabot PRs continue to need manual review — that's intentional.

Refs

PR #38 sat for 6 days before Dependabot itself rebased it as PR #54
(the noise that triggered this fix). Dev-only @types/node + typescript
minor/patch bumps across 17 services don't need human review every
week — they need to merge themselves when CI is green.

Scope (deliberately narrow):
  - fires ONLY on PRs from dependabot[bot] (verified via two checks:
    github.actor + pull_request.user.login)
  - auto-merges ONLY when ALL of:
      (a) dependency-type = direct:development  (dev-deps, not prod)
      (b) update-type ∈ {semver-minor, semver-patch}  (NOT semver-major)
      (c) all status checks pass (gh pr merge --auto waits)
  - production deps, major bumps, or CI failures → human review still required

Repo settings updated separately via API:
  - allow_auto_merge: true
  - delete_branch_on_merge: true

Action pin (dependabot/fetch-metadata@d7267f6 = v2.3.0) per OpenSSF
Scorecard best-practice: third-party actions pinned to full commit SHA.

Refs:
  https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
@g-shevchenko g-shevchenko merged commit 313935b into main May 24, 2026
5 checks passed
@g-shevchenko g-shevchenko deleted the claude/dependabot-auto-merge branch May 24, 2026 18:00
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