Skip to content

Separate changelogs for multiple tags on the same commit are not fully supported #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
bal-stan opened this issue Feb 3, 2025 · 0 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@bal-stan
Copy link

bal-stan commented Feb 3, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Git-cliff cannot generate separate changelogs for multiple tags on the same commit. I believe it only generates a changelog for the first tag it finds.

#149 seems similar to my issue but not quite the same (see below).

Steps To Reproduce

Create a repository with the following sequence of commands:

mkdir test-repo
cd test-repo/
git init 
mkdir proj1
mkdir proj2
touch proj1/file1
touch proj2/file1
git add proj1 
git commit -m "feat(proj1): Proj1 version 1"
git add proj2
git commit -m "feat(proj2): Proj2 version 1"
git tag Proj1-1.0.0
git tag Proj2-1.0.0
touch proj1/file2
touch proj2/file2
git add proj1
git commit -m 'feat(proj1)!: Proj1 version2'
git add proj2
git commit -m 'feat(proj2)!: Proj2 version2'
git tag Proj1-2.0.0
git tag Proj2-2.0.0

Then, ask git-cliff to generate changelogs for Proj1 and Proj2 separately:

$ git-cliff --include-path="proj1/**" --tag-pattern Proj1 --tag Proj1-2.0.0 --current
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
# Changelog
...
$ # Now for the second project
$ git-cliff --include-path="proj2/**" --tag-pattern Proj2 --tag Proj2-2.0.0 --current
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 ERROR git_cliff > Changelog error: `No tag exists for the current commit`

However, if I delete the Proj1-2.0.0 tag first and then re-run git-cliff - it works:

$ git tag -d Proj1-2.0.0 
$ git-cliff --include-path="proj2/**" --tag-pattern Proj2 --tag Proj2-2.0.0 --current
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 WARN  git_cliff > There is already a tag (Proj2-2.0.0) for 7830b7a6ed7519629b95e24b220ad3c3624a6fa9
# Changelog
...

Expected behavior

I expect to be able to generate both changelogs without an issue and while using include and exclude path filters.

Screenshots / Logs

No response

Software information

  • Operating system: Linux
  • Rust version: N/A pip install
  • Project version: 2.8.0

Additional context

No response

@bal-stan bal-stan added the bug Something isn't working label Feb 3, 2025
@bal-stan bal-stan changed the title Multiple tags on the same commit are not fully supported Separate changelogs for multiple tags on the same commit are not fully supported Feb 3, 2025
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

No branches or pull requests

2 participants