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

feat: Add commits to Unreleased when no tags. #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

b01
Copy link

@b01 b01 commented Oct 4, 2021

What does this do / why do we need it?

When there are commits and no existing git tags, add any notable changes to the "Unreleased" section of the change log.

This requires is a breaking change because

  1. You no longer receive an error when you have notable commits but no tags yet.
  2. In order for the Unreleased section to show for this scenario, you are required to update your KAC .chglog/CHANGELOG.md.tpl file to the latest version by run git-chglog --init

Existing template will still work.

How this PR fixes the problem?

In the chglog.go file some function have been update so that if the code cannot find any tag and there is no value set for "nexttag" or in the query, then allow a CHANGLOG.md to get generated. The template has been updated to alllow the "Unreleased" section to be displayed even when no previous versions exist.

Changed the code in several places so that when there is no tag query set, then continue program execution, even if no tags are found. Thus removing the "no tags" error, if any programs parsed that error they will break. This allows unreleased commits from the beginning of he repositories history to be collected.

In addition, the templates had to be modified to allow adding the unreleased sections independent of versions. Since there will be no versions, as implied when there are no tags.

What should your reviewer look out for in this PR?

  • Updated tests
  • Verify modifications to the CHANGELOG.tpl.md that is built.

Check lists

  • Test passed
  • Coding style (indentation, etc)

Additional Comments (if any)

Again, I am proposing this BREAKING CHANGE, which is that the program will never show the no tags error message again. The closes a PR that changes that message.

Which issue(s) does this PR fix?

fixes #76
closes #187

@b01
Copy link
Author

b01 commented Feb 4, 2022

I'm not sure what my next steps are or how to get the linting and test to turn green. Any suggestions?

@b01 b01 force-pushed the issue-76-enhancement-when-no-tags-present branch from 103409b to c59129f Compare May 3, 2022 04:07
@b01 b01 force-pushed the issue-76-enhancement-when-no-tags-present branch from c59129f to 8cffe68 Compare June 19, 2023 19:35
@b01
Copy link
Author

b01 commented Jun 19, 2023

I've put this out there a while ago. I'm using this tool all the time. I've hit a place where this would be nice to have. I want to contribute instead of running off on my own fork. What can I do to get this merged in?

Like why aren't the lint and test running? May I please have some guidance?

@b01 b01 force-pushed the issue-76-enhancement-when-no-tags-present branch 4 times, most recently from 5bb5d0f to 0d24f7b Compare June 25, 2023 14:54
@b01
Copy link
Author

b01 commented Jun 25, 2023

I recently re-looked at this code and made changes. It now performs the expected behavior.

@b01 b01 force-pushed the issue-76-enhancement-when-no-tags-present branch 10 times, most recently from 32ee1c9 to 99432e5 Compare June 27, 2023 12:38
When there are commits but no tags, then insert those commits under
the unreleased section of the change log output. This requires get
an updated CHANGELOG.md.tpl file. Includig the template footer to
account for the unreleased line there that used .Versions.

resolves git-chglog#76

BREAKING CHANGE:

* No longer throw the error "no tags" when:
   * No tag query entered
   * There are commits to tag
* Requires an update to the changelog template
@b01 b01 force-pushed the issue-76-enhancement-when-no-tags-present branch from 99432e5 to 175b6f3 Compare June 29, 2023 12:32
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.

Support initial Changelog if not Tags are present
1 participant