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: parse query as unreleased list of arbitrary git refs if valid tags are not found #241

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davidalpert
Copy link

What does this do / why do we need it?

This PR is a proposal to address #234 which documents a few use cases for generating change logs that are not based on tags or even release versions.

How this PR fixes the problem?

When the given refs are not found as valid tags, this PR allows the changelog generator to fall back and try querying the given refs as unreleased commits.

This approach maintains the semantic intention of git-chglog around published tags and semantic versioning, but also allows for use of the tool to generate an "unreleased changelog" for any arbitrary set of valid git refs.

What should your reviewer look out for in this PR?

  • updating this check resulted in two unit tests breaking, so I have changed those tests from assuming an error to assuming no error; this should be reviewed to ensure that
    • the updated tests are correct and don't introduce/represent a breaking change; and
    • the updated tests are sufficient to describe this additional behavior

Check lists

  • Test passed
  • Coding style (indentation, etc)

Additional Comments (if any)

This is a proposal based on the discussion in #234; I am open to feedback on everything about it.

Which issue(s) does this PR fix?

fixes #234

@davidalpert davidalpert changed the title refactor: extract method to abstract building versions a query of refs feat: parse query as unreleased list of arbitrary git refs if valid tags are not found Mar 28, 2023
@davidalpert davidalpert marked this pull request as ready for review March 29, 2023 16:27
@davidalpert davidalpert force-pushed the GH-234-allow-commit-refs-in-addition-to-tags branch from a1b86a3 to d199862 Compare March 29, 2023 17:09
@davidalpert
Copy link
Author

@mavogel would it be possible to review this proposed change as a possible solution to #234?

I have been using a forked version of git-chglog based on this PR now for several weeks and it seems stable.

@husam-e
Copy link

husam-e commented Aug 22, 2023

+1, this is def a valuable feature that will be used in a variety of use cases, including workflows that do use tags but want to generate release notes before the tag is created, or even for release notes from initial commit to first tag!

@davidalpert
Copy link
Author

if there is interest in this by the maintainers I could rebase it.

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.

Feature request -- use commit refs instead of tags
2 participants