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

gren changelog vs gren changelog --generate inconsistency #143

Open
phun-ky opened this issue Mar 5, 2018 · 3 comments
Open

gren changelog vs gren changelog --generate inconsistency #143

phun-ky opened this issue Mar 5, 2018 · 3 comments

Comments

@phun-ky
Copy link

phun-ky commented Mar 5, 2018

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?

@alexcanessa
Copy link
Member

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?

@phun-ky
Copy link
Author

phun-ky commented Mar 7, 2018

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/

@alexcanessa
Copy link
Member

Ohhhh! I see now!

Ok good point! Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants