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 option to exclude merge commits #158

Merged
merged 1 commit into from
Jan 21, 2024
Merged

feat: add option to exclude merge commits #158

merged 1 commit into from
Jan 21, 2024

Conversation

arnested
Copy link
Contributor

This adds an option to the init and add 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.

Copy link

codecov bot commented Jan 21, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (819eaf2) 65.18% compared to head (a3c8c51) 65.60%.

Files Patch % Lines
add.go 0.00% 0 Missing and 1 partial ⚠️
init.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
+ Coverage   65.18%   65.60%   +0.41%     
==========================================
  Files           7        7              
  Lines         247      250       +3     
==========================================
+ Hits          161      164       +3     
  Misses         64       64              
  Partials       22       22              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arnested arnested marked this pull request as ready for review January 21, 2024 15:18
@arnested
Copy link
Contributor Author

I have added some tests for the feature and mention the option in README.

@djgilcrease djgilcrease merged commit 4653151 into goreleaser:main Jan 21, 2024
6 checks passed
@arnested arnested deleted the exclude-merge-commits branch January 21, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants