Skip to content

fix: determine_bump return none instead of defaulting to patch when n…#15

Merged
shavonn merged 1 commit into
mainfrom
fix/default-bump-behavior
Apr 1, 2026
Merged

fix: determine_bump return none instead of defaulting to patch when n…#15
shavonn merged 1 commit into
mainfrom
fix/default-bump-behavior

Conversation

@shavonn
Copy link
Copy Markdown
Contributor

@shavonn 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.

Copilot AI review requested due to automatic review settings April 1, 2026 17:19
@shavonn shavonn added the bug Something isn't working label Apr 1, 2026
@shavonn shavonn merged commit 5b43027 into main Apr 1, 2026
2 checks passed
@shavonn shavonn deleted the fix/default-bump-behavior branch April 1, 2026 17:20
@github-actions github-actions Bot mentioned this pull request Apr 1, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_bump now returns none when no releasable commits are found, instead of defaulting to patch.
  • Release PR creation is skipped when the computed bump is none, with a workflow warning.
  • Bats tests updated to expect none for ci:, 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.

Comment thread scripts/conventional.sh
@@ -32,7 +32,7 @@ get_last_tag() {
# Reads commit messages from stdin, one per line
# Returns: major, minor, or patch
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# Returns: major, minor, or patch
# Returns: major, minor, patch, or none (when no relevant changes are detected)

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +13 to +15
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.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants