commitizen-tools / commitizen

Create committing rules for projects :rocket: auto bump versions :arrow_up: and auto changelog generation :open_file_folder:
https://commitizen-tools.github.io/commitizen/
MIT License
2.28k stars 251 forks source link

Cannot create release version after creating a pre-release version #1068

Open ahmadgbg opened 2 months ago

ahmadgbg commented 2 months ago

Description

Hi, I am pretty new when it comes to using Commitizen and have not been able to solve this issue:

Commitizen verison: 3.21.2 Version provider: poetry

When merging a pull request in Github, I have a workflow that automatically creates a pre-release using cz bump --prerelease alpha. This is being created perfectly but after test that and checking that everything works fine, I have a manual flow that I can trigger to create a Release. This release flow will run cz bump. This fails with the message: No commits found.

I have tried adding cz -nr 3 bump with no success (same results).

Not sure but it seems like the pre-release is noticing a new feature change and bumping the version. After that a new commit with the alpha version bump is creating in main which makes the release version not noticing the feature commit?

Is there a way to release (bump) after doing a pre-release without need a new commit?

Steps to reproduce

  1. Push a PR with feat in title.
  2. Merge PR and GitHub workflow will create a pre-release version (using cz bump -prerelease alpha)
  3. Manually trigger a workflow with release version (using cz bump)

Current behavior

When bumping to the release version, error message is shown: No commits found

Desired behavior

A release version should be able to be created after pre-release version

Screenshots

No response

Environment

Lee-W commented 1 month ago

As this issue is mentioned in #1073 , I'll mark it as wait-for-implement and feature, maybe? @noirbizarre Please let me know if I misunderstood anything 🤔