Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/auto-versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: Auto Versioning and Release
# SEMANTIC VERSIONING RULES:
# - PATCH (0.14.1 → 0.14.2): fix:, perf:, refactor:, docs:, style:, test:, build:, ci:
# - MINOR (0.14.1 → 0.15.0): feat:, feat(...):
# - MAJOR (0.14.1 → 1.0.0): feat!:, fix!:, or "BREAKING CHANGE: <description>" (NOT "BREAKING CHANGE: None")
# - MAJOR (0.14.1 → 1.0.0): MANUAL ONLY - Create git tag manually when ready for 1.0.0
#
# ⚠️ IMPORTANT: Do NOT use "BREAKING CHANGE: None" in commit messages - it triggers a major bump!
# Instead, omit the BREAKING CHANGE line entirely if there are no breaking changes.
# ⚠️ Major version bumps are intentionally disabled in automation to prevent accidents.

on:
push:
Expand Down Expand Up @@ -34,16 +33,13 @@ jobs:
with:
# The prefix to use to create tags
tag_prefix: "v"
# Regex pattern for major version bump (breaking changes)
# Matches ONLY actual breaking changes, not "BREAKING CHANGE: None"
# Pattern: !: in commit type OR "BREAKING CHANGE:" followed by non-None text
major_pattern: "/(feat|fix|chore|refactor|perf|test|docs|style|build|ci)!:|BREAKING CHANGE:(?!\\s*None)/"
# Regex pattern for major version bump - DISABLED (manual only)
# Use a pattern that will never match to prevent automated major bumps
major_pattern: "/__MANUAL_MAJOR_BUMP_ONLY__/"
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The pattern uses double underscores which, while functional as an unmatchable pattern, is not a standard regex practice. A more conventional approach would be to use a pattern that explicitly cannot match any valid commit message, such as "^(?!.*).*$" (matches nothing) or simply an empty string "" if the action supports it. However, the current pattern is clear in intent and will work correctly, so this is a style preference rather than a functional issue.

Suggested change
major_pattern: "/__MANUAL_MAJOR_BUMP_ONLY__/"
major_pattern: "^(?!.*).*$"

Copilot uses AI. Check for mistakes.
# Regex pattern for minor version bump (new features)
# Matches: "feat:" prefix in commit messages (Conventional Commits)
minor_pattern: "/(feat|feat\\()/"
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The minor_pattern includes redundant logic. The pattern /(feat|feat\\()/ matches both feat and feat(, but since feat alone would match both cases, the feat\\( alternative is unnecessary. Consider simplifying to "/feat/" or if you need to be explicit about scopes, use "/feat(\\(|:)/" to match feat: or feat(.

Suggested change
minor_pattern: "/(feat|feat\\()/"
minor_pattern: "/feat(\\(|:)/"

Copilot uses AI. Check for mistakes.
# Regex pattern for patch version bump (bug fixes)
# Matches: "fix:" prefix in commit messages
patch_pattern: "/(fix|fix\\()/"
# Patch bumps: All other commits (fix:, chore:, etc.) are treated as patches by default
# Pattern to determine formatting
version_format: "${major}.${minor}.${patch}"
# If no tags are found, this version is used
Expand Down
Loading