feat: add option to exclude merge commits #158
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an option to the
init
andadd
commands to exclude merge commits from the changelog.Merge commits often contain no useful information for the changelog, and can be confusing to users. This option allows them to be excluded.
The default behavior is unchanged, and merge commits are included in the changelog.
The pull request does not include tests yet. I will add them if this is a feature you would like to see in the tool. I'll also add documentation if we move forward with the change.
The change is a breaking change for those using it as a library. I couldn't see another way to add the option without breaking the API. I'm happy to discuss other options if you have any ideas.
At least it doesn't appear to break any of the known, public uses of the library listed on https://pkg.go.dev/github.com/goreleaser/chglog@v0.5.0?tab=importedby.