Skip to content

ci: auto-merge Dependabot patch/minor PRs after 5-day cooldown - #259

Merged
kellenmurphy merged 2 commits into
mainfrom
ci/dependabot-cooldown-automerge
Aug 7, 2026
Merged

ci: auto-merge Dependabot patch/minor PRs after 5-day cooldown#259
kellenmurphy merged 2 commits into
mainfrom
ci/dependabot-cooldown-automerge

Conversation

@kellenmurphy

Copy link
Copy Markdown
Owner

Implements hands-off Dependabot handling with a supply-chain waiting period:

dependabot.yml

dependabot-automerge.yml (new workflow)

  • On Dependabot PRs, checks the update type via dependabot/fetch-metadata (SHA-pinned, v3.1.0).
  • Patch and minor updates get squash auto-merge enabled; branch protection still requires Build & Test, GuardDog, Dependency Review, and CodeQL to pass before the merge happens.
  • Major updates are untouched — they stay open for manual review.
  • Auto-merge is enabled with a fine-grained PAT (DEPENDABOT_AUTOMERGE_TOKEN, stored as a Dependabot secret) rather than GITHUB_TOKEN, because merges made by GITHUB_TOKEN don't trigger on: push workflows — the Cloudflare Pages deploy and release-please would silently stop running.

Setup required before this works end-to-end: create a fine-grained PAT (repo: samlguy; permissions: Contents RW, Pull requests RW, Workflows RW) and store it with:

gh secret set DEPENDABOT_AUTOMERGE_TOKEN --app dependabot --repo kellenmurphy/samlguy

- dependabot.yml: add 5-day release cooldown to npm and github-actions
  ecosystems so updates are only proposed once a release has aged
- dependabot.yml: group github/codeql-action sub-actions into one PR
  to avoid the mixed-version CodeQL failure seen with split bumps
- new dependabot-automerge workflow: enables squash auto-merge on
  patch/minor Dependabot PRs; branch protection holds the merge until
  required checks pass; majors remain manual
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy
kellenmurphy merged commit 0e10b24 into main Aug 7, 2026
11 checks passed
@kellenmurphy
kellenmurphy deleted the ci/dependabot-cooldown-automerge branch August 7, 2026 18:02
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