paultyng / changelog-gen

Generate changelog copy from all PRs to a branch.
Mozilla Public License 2.0
5 stars 4 forks source link

Add option to exclude start commit #11

Open stepanstipl opened 3 years ago

stepanstipl commented 3 years ago

This PR adds a flag -exclude-start to exclude start commit from the changelog. Defaults to false to keep current behaviour as default.

I find this a common scenario when changelog is generated current commit and the latest release (or master).

changelog-gen -owner <gh-owner> -repo <gh-repo> <latest_release_SHA> <current_SHA>

Without this flag, the <latest_release_SHA> commit, resp. Its associated PR, would be included in the generated changelog. However, this is undesirable, as that commit was already included in the previous release, and is not part of the current one.

I.e. because both start and end SHA intervals are closed, the start/end commits will be duplicated. This flag makes the start interval open, to avoid overlap.