github-release-notes icon indicating copy to clipboard operation
github-release-notes copied to clipboard

gren changelog vs gren changelog --generate inconsistency

Open phun-ky opened this issue 7 years ago • 3 comments

After fiddling with the PRs for #140, I came across something that might be an inconsistency in the code.

Running:

gren changelog --include-messages=all --override

Generates CHANGELOG.md (with all releases) these lines (before the fix):

## v1.1.0-beta.0 (01/03/2018)
- [1.1.0-beta.0](https://api.github.com/...) - Author Authorson

After changing the template in the global scope for templateCommits, I rerun:

gren changelog --include-messages=all --override

Providing the same result. Which has not the updated URLs.

But if I run:

gren changelog --include-messages=all --override --generate

I get the CHANGELOG.md with the updated template:

## v1.1.0-beta.0 (01/03/2018)
- [1.1.0-beta.0](https://github.com/...) - Author Authorson

Is this intended, or a bug?

phun-ky avatar Mar 05 '18 09:03 phun-ky

The gren changelog command gets the releases body from the existing ones online, therefore the other options related to the "generating releases" won't be used.

If you want to generate the changelog from scratch, you can use --generate and use all the options from the release command.

Docs

Maybe isn't clear enough?

alexcanessa avatar Mar 06 '18 19:03 alexcanessa

Ah, no you misunderstand, the issue is not whether or not the number of releases are one or more, it's that gren some how caches between usage of gren changelog and gren changelog --generate.

After I applied the fix for #140 , I ran gren changelog, expecting the urls in CHANGELOG.md to be the correct one, but it was still pointing to https://api.github.com/. The only way I could force gren to use the new and correct url was with gren changelog --generate, producing the correct urls, starting with https://github.com/

phun-ky avatar Mar 07 '18 19:03 phun-ky

Ohhhh! I see now!

Ok good point! Thanks 😄

alexcanessa avatar Mar 08 '18 19:03 alexcanessa