fix(release-pr): only propose worthwhile releases - #84
Conversation
PR Summary by QodoGate speculative release PRs on release-worthy commits
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
=======================================
Coverage 47.93% 47.93%
=======================================
Files 31 31
Lines 1863 1863
=======================================
Hits 893 893
Misses 970 970
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper |
Every conventional type bumps at least the patch version, so the inferred version alone does not tell a fix apart from the weekly hook autoupdate. As first written the trigger would have opened a release PR on nearly every merge to main, both bot streams included: `chore: autoupdate pre-commit hooks` and `build(deps): bump ...` match no skip rule in cliff.toml, and both bump. A speculative run now also needs at least one commit that cliff.toml grouped as a feature, fix, performance change or revert, or that it marked breaking. That verdict comes from `git cliff --context`, so the skip rules and the breaking-change detection are not reimplemented here. Selecting the null-version entry matters: --unreleased returns the previous release too, and counting it would leave the gate permanently open. A manual dispatch skips the gate. A human asking for a release has already supplied the reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0e6e66f to
4771153
Compare
Follow-up to #81, which I got wrong. The push trigger as merged opens a release PR on nearly every merge to
main— including both bot streams.The mistake
I claimed in #81 that "git-cliff bumps only for
feat,fixand breaking changes". That came from testinggit cliff --bumped-version <range>, which is not the form the workflow runs. Re-tested the way the workflow actually invokes it — bare, against a checked-out HEAD — every conventional type bumps at least the patch:v0.1.1chore:,docs:,build:,ci:,style:,test:,refactor:,perf:,revert:,fix:v0.1.2feat:, any!:, anyBREAKING CHANGE:footer on any typev0.2.0chore(deps),chore: merge,docs(blame)— theskiprules incliff.tomlThe two bot streams land outside those skip rules: the weekly
chore: autoupdate pre-commit hooksis matched by no rule, and Dependabot here commits asbuild(deps):while the only deps skip is^chore\(deps.*\). Both would have proposed their own release.The fix
A speculative run now needs a reason beyond the version having moved. It gates on the group
cliff.tomlparsed each commit into — features (00), fixes (01), performance (02), reverts (10) — plus anything marked breaking.The verdict comes from
git cliff --unreleased --context, so the skip rules and the breaking-change detection are not reimplemented here;cliff.tomlremains the only parser. Groups are matched on the ordering index rather than the label, which carries an emoji. Changing that set is a one-line policy change.Two details worth calling out:
--unreleased --contextreturns the previous release alongside the unreleased one. Counting both leaves the gate permanently open, so the null-version entry has to be selected. Caught in testing.Everything outside the release-worthy set still reaches the changelog and still bumps the version. It just does not, on its own, propose a release.
Test plan
The
resolvescript was extracted from the YAML and executed, not reasoned about.chorealone;build(deps)alone; and a batch ofchore+build+docs+ci+test+refactor. All exit 0 withrelease=false.fixamong chores;feat;perf;revert;refactor!:; andrefactor:with aBREAKING CHANGE:footer. The last two matter: both are breaking changes on a type outside the listed groups, and a naive type-prefix filter would have silently dropped them.versioninputs behave as before.fixcommits unreleased sincev0.1.1.actionlintclean,make checkgreen.Merge order
Worth merging before #83. Both changes are
fix, so the version staysv0.1.2and #83 updates in place to cover both. Merging #83 first cutsv0.1.2, and this would then proposev0.1.3on its own.🤖 Generated with Claude Code