Skip to content
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

Question: unreleased commits ony in last version #452

Open
mastrolube opened this issue Nov 10, 2021 · 3 comments
Open

Question: unreleased commits ony in last version #452

mastrolube opened this issue Nov 10, 2021 · 3 comments
Labels
help wanted type: feature A new enhacement proposal

Comments

@mastrolube
Copy link

Hello!
Sorry for opening an issue, looks like there isn't a "discussion" tab here...
I've a problem and probably is due to my lack of knowledge.
I'm maintaining a project (which is at v2.10.4) and also working on a v3.0.0 in the meantime.
As you can imagine some of my commits in the v3 branch have been made before the release of the latest patches and minors (>2.9.x).
For example, I made a commit for v3 (in local) and also pushed the v2.10.2 (remote).
All my commits follow the conventional commits:

fix: bla bla
feat: bla bla

The problem is when I generate my changelog for version v3 (for beta testing purposes) I get some of my commits in the older versions.

For example, in the Changelog.MD lot of commits gets added to version 2.10.2 which has been just released and doesn't contain them.

2.10.2 (2021-11-06)
Fix

  • OK
  • OK
  • SHOULD NOT BE THERE (v3 related)
  • SHOULD NOT BE THERE (v3 related)
  • OK
  • SHOULD NOT BE THERE (v3 related)

Did I do something wrong when I made commits?
Can something be done to have all not released commits in my last beta version instead of having them split in all older versions?

Thank you for your help!

@woile
Copy link
Member

woile commented Nov 10, 2021

We are sorting by --author-date-order the commits.
Could you run this command with the different ordering algorithms and see if any of them outputs in a correct way?

git -c log.showSignature=False log  --pretty="%H%n%s%n%an%n%ae%n%b%n----------commit-delimiter----------"  <SORTING_ARG>

Where SORTING_ARG can be:

  • --date-order
  • --topo-order

Seems like a bit of a stretch for commitizen limits. Not sure if it can support this workflow (maintaining 2 versions at the same time, v2.x and v3.x). It's intended for a more straightforward workflow. v3.x is released, then no more updates on the v2.x.

I wonder if we could find a good strategy to filter the commits already used 🤔 @Lee-W any ideas?

What you can do for now, is manually remove those commits from the CHANGELOG.md.
If you are using cz bump --changelog or cz changelog --incremental, commitizen won't touch the existing versions in the changelog.

@mastrolube mastrolube changed the title Question: ureleased commits ony in last version Question: unreleased commits ony in last version Nov 10, 2021
@mastrolube
Copy link
Author

Thank you very much for the super fast reply!
I go the same result from both sorting methods (I checked the 2.10.2 which contains the most unwanted commits and they are all there).

For now, I'll follow your suggestion at the end of your text!
Thank you! 👍

@Lee-W Lee-W added the type: feature A new enhacement proposal label Nov 12, 2021
@Lee-W
Copy link
Member

Lee-W commented Nov 12, 2021

I think this is a limitation of commitizen as of now. Don't have a good idea yet 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type: feature A new enhacement proposal
Projects
None yet
Development

No branches or pull requests

3 participants