Skip to content

fix(cliff): add the tag_pattern to ignore non-release tags - #28

Merged
cdunster merged 1 commit into
mainfrom
ignore-non-semver-tags
Apr 20, 2026
Merged

fix(cliff): add the tag_pattern to ignore non-release tags#28
cdunster merged 1 commit into
mainfrom
ignore-non-semver-tags

Conversation

@cdunster

@cdunster cdunster commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Currently, all tags are matched and added to the changelog but that breaks the --bump logic of git-cliff because it takes a tag like main-<sha> and doesn't know how to bump it. With this change any unmatched tags are ignored and the commits under it are added to the next valid commit, that means that given the following:

gitGraph:
       commit id: "1"
       commit id: "2" tag: "main-2"
       commit id: "3"
       commit id: "4" tag: "v0.1.0"
       commit id: "5"
Loading

Commits 1, 2, 3, and 4 are all added to the changelog under the v0.1.0 tag. Then, if running with --bump then a new entry will be added to the changelog with commit 5 under v0.1.1.

@cdunster cdunster self-assigned this Apr 20, 2026
@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@cdunster has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 43 minutes and 29 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 43 minutes and 29 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2f41737-321c-44fe-9f1b-ce1ce42166c7

📥 Commits

Reviewing files that changed from the base of the PR and between 45d46ad and e7f051f.

📒 Files selected for processing (1)
  • pre-1.0-cliff.toml

Walkthrough

A git-cliff configuration file was modified to add a tag_pattern entry under the [git] section. This configuration explicitly defines which git tags are recognized as release tags by matching semantic version patterns, including tags with an optional leading v prefix. The change applies to changelog generation tag matching without modifying any exported or public entities.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate relevance to the changeset. Add a description explaining the purpose of the tag_pattern configuration and why this change is necessary.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding tag_pattern configuration to filter non-release tags in git-cliff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ignore-non-semver-tags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pre-1.0-cliff.toml`:
- Around line 85-86: The tag_pattern value is wrong: the patch component lacks a
+ quantifier and the pattern is unanchored; update the tag_pattern key so it
uses a proper regex (e.g. for final release-only tags set tag_pattern =
"^v?[0-9]+\\.[0-9]+\\.[0-9]+$" or, if you intend to include pre-releases, use
"^v?[0-9]+\\.[0-9]+\\.[0-9]+") to match the behavior used/expected by
prepare_release.rs (see how it distinguishes anchored final-release vs
unanchored pre-release patterns); replace the current tag_pattern string
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fdcd28a8-5154-437f-8961-e02d966d788a

📥 Commits

Reviewing files that changed from the base of the PR and between 41aef90 and 45d46ad.

📒 Files selected for processing (1)
  • pre-1.0-cliff.toml

Comment thread pre-1.0-cliff.toml Outdated
@cdunster
cdunster force-pushed the ignore-non-semver-tags branch from 45d46ad to e7f051f Compare April 20, 2026 08:12
@cocogitto-bot

cocogitto-bot Bot commented Apr 20, 2026

Copy link
Copy Markdown

✔️ e7f051f - Conventional commits check succeeded.

Comment thread pre-1.0-cliff.toml
@cdunster
cdunster requested a review from a team April 20, 2026 08:19
@cdunster
cdunster merged commit 03c55c6 into main Apr 20, 2026
5 checks passed
@cdunster
cdunster deleted the ignore-non-semver-tags branch April 20, 2026 12:02
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.

2 participants