fix: determine_bump return none instead of defaulting to patch when n…#15
Conversation
shavonn
commented
Apr 1, 2026
- determine_bump now returns none instead of defaulting to patch when no releasable commits are found. Only feat, fix, chore, docs, refactor, perf, style, build, and revert prefixes trigger a bump. ci:, test:, and non-conventional commits are ignored.
- create-release-pr.sh skips release PR creation when the bump is none, with a warning message.
- Tests updated — ci:, test:, and non-conventional commits now expect none.
…o releasable commits are found
There was a problem hiding this comment.
Pull request overview
Updates the release automation’s conventional-commit bump detection so releases are only created when “releasable” commit prefixes are present, avoiding patch releases for non-release changes (e.g., CI/test-only updates).
Changes:
determine_bumpnow returnsnonewhen no releasable commits are found, instead of defaulting topatch.- Release PR creation is skipped when the computed bump is
none, with a workflow warning. - Bats tests updated to expect
noneforci:,test:, and non-conventional commits.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/conventional.bats | Updates expectations and adds cases for ci:/test: returning none. |
| scripts/create-release-pr.sh | Skips release PR creation when bump is none and emits a warning. |
| scripts/conventional.sh | Changes default bump from patch to none and refines patch-triggering prefixes. |
| README.md | Formatting changes in documentation; wording now needs to reflect the updated “no releasable commits” behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -32,7 +32,7 @@ get_last_tag() { | |||
| # Reads commit messages from stdin, one per line | |||
| # Returns: major, minor, or patch | |||
There was a problem hiding this comment.
The determine_bump header comment is now outdated: the function can return "none" (in addition to major/minor/patch). Update the documented return values so callers and tests don’t rely on the old contract.
| # Returns: major, minor, or patch | |
| # Returns: major, minor, patch, or none (when no relevant changes are detected) |
| By default, every merged PR triggers a release. If you'd rather control when releases happen, set | ||
| `require-release-label: true` and add the configured label (default: `change-release`) to PRs that should trigger a | ||
| release. |
There was a problem hiding this comment.
This paragraph says every merged PR triggers a release by default, but the updated logic can now skip releases when there are no releasable commits (e.g., only ci:/test:/non-conventional commits). Please adjust the wording to reflect that releases are only triggered when at least one releasable conventional commit is found (unless release-label gating is enabled).
| By default, every merged PR triggers a release. If you'd rather control when releases happen, set | |
| `require-release-label: true` and add the configured label (default: `change-release`) to PRs that should trigger a | |
| release. | |
| By default, a merged PR triggers a release only if it contains at least one releasable conventional commit (for | |
| example, a `feat` or `fix`), so PRs with only non-releasable or non-conventional commits may be skipped. If you'd | |
| rather additionally gate releases behind a label, set `require-release-label: true` and add the configured label | |
| (default: `change-release`) to PRs that should trigger a release. |