Repository navigation
ci: Dependabot's patch and minor updates merge by themselves once the checks pass - #35
Merged
Merged
Conversation
… checks pass A Dependabot action for each repository's pull_request_target workflow turns on GitHub's squash auto-merge with the organization's app token, only where the default branch requires Check / Check and Review, for npm PRs of patch and minor updates from 1.0 up with only Dependabot's commits and no .github change. It turns auto-merge off again when a PR stops qualifying. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…commits Dependabot quotes scoped names in its metadata, so "@hono/node-server" never matched its version line and most security PRs counted as major. Each run now turns earlier auto-merge off first and back on only while the head qualifies, and only Dependabot's commits signed by GitHub count. A real security-group commit is a test fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sil wants green Dependabot PRs to merge by themselves, so security updates stop piling up across the websites. Today they wait for a person, even when every check passed.
This adds a Dependabot action that each website, astro-template and vite-template call from a small
pull_request_targetworkflow (the caller is in the README). Each run first turns off auto-merge from an earlier run. It then turns GitHub's squash auto-merge back on, so GitHub merges once the required checks pass, only when:Check / CheckandReview. Without them, auto-merge would merge at once, even when red;.github/changes.It merges at once only when GitHub refuses auto-merge because the PR can already merge, tied to the head SHA.
The organization's GitHub App token turns it on, so the merge starts the workflows on main (Check and the live tests); a GITHUB_TOKEN merge would not.
pull_request_targetruns the default branch's file with the repository's secrets and the action never checks out the PR. Each repository needs:RELEASE_APP_CLIENT_IDvariable and theRELEASE_APP_PRIVATE_KEYsecret, which the organization now shares with only a few repositories.Without them the job fails and nothing merges.
An independent review found that quoted scoped names counted as major, that only a successful later run turned auto-merge off, and that the commit author alone can be set by anyone. All three are fixed, with a real Dependabot commit as a test fixture.
node --test tests/*.test.mjspasses, 30 tests, 7 of them for this action.Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code