Add --ancestors-only and --filter flags + some much needed maintenance #156
Add --ancestors-only and --filter flags + some much needed maintenance #156
Conversation
|
Hey @h0tw1r3 It's a pretty meaty PR but it would be awesome if you could pull it down and take it for a spin. Your comment in #145 about the tags api response is right! The PR actually switches to using Git to get the tags. Then uses I think the original decision to go with the api for tags was that when run in CI, the results were not consistent with some local tests. IIRC, I mainly tested on some big module repos with big complicated histories (puppetlabs-chocolatey & puppetlabs-docker), so i'd be interested to see how this performs. With regards to the suggestion you made in #145, if we can get all of the information needed with one git command.. that would be pretty sweet. |
|
Looks like i've missed something in the tests.. will investigate and update tomorrow |
Yeah, lol. I'd say. Code review won't be a thing, but I'll test it on a few repos.
The inconsistency usually comes from how the repo was cloned, reach-ability (orphans with tags, oh my), and mixing tag types. The GH API consistently returns everything.
|
|
🤣 I will probably split this up to be honest. It would make better sense as smaller PRs. In the meantime, the concept is here and it's good for testing. |
|
Filter doesn't work for me, or I'm using it wrong. Calling Before After Confirmed CHANGELOG.md is the same before and after. gh-changelog-145...h0tw1r3:gh-changelog:gh-changelog-145-faster |
This change adds two new flags to the
newcommand.--ancestors-onlyWhen this flag is passed, the builder will filter out any tags that are not an ancestor of the current branch. This is a possible fix for #145 .
--filterWhen this flag is passed, the builder will filter out any tags that do not match the given
RE2regexp.Additionally this PR contains some needed fixes and 💅
log.Infof(....).