Closed btmills closed 8 years ago
Nice! That was quick! I'll let @nzakas take a look at it before merging. He knows the code best.
Updated. As long revert commits follow the default format of This reverts commit c9c34ea7ecc13d1f90e728c0cccb97bdf96aa5a6.
, then the reverted commits will be excluded.
This now only excludes reverts from the changelog if the revert commit and the commit it reverts are both included within the release. Reversions of commits in previous releases are included in the changelog, but they are not included as part of the automatic version calculation.
Two remaining caveats that I see:
This reverts commit c9c34ea7ecc13d1f90e728c0cccb97bdf96aa5a6.
. As this is the default message created by both GitHub and the Git CLI, that shouldn't be an issue unless somebody gets fancy. I don't know that there's an automatic solution to this.Lgtm. I think the caveats are fine.
When generating changelogs or calculating new versions, reverted commits are ignored. For example:
Will become:
And the new version will be a patch bump.
calculateReleaseFromGitLogs
is only called fromcalculateReleaseInfo
, so we can safely assume the logs are in the format--pretty=format:"* %h %s (%an)"
as specified incalculateReleaseInfo
. ThoughcalculateReleaseFromGitLogs
is included inmodule.exports
, it is marked as@private
, so I didn't label this as a breaking change.