github-tools / github-release-notes

Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
https://github-tools.github.io/github-release-notes/
GNU General Public License v3.0
882 stars 325 forks source link

Separate templates for changelogs and releases #150

Open sergeysedykh opened 6 years ago

sergeysedykh commented 6 years ago

As my repo is private, I'd like to keep links to issues in the release notes and remove them from the CHANGELOG.md file.

Any hints?

Thanks a lot for GREN, it's awesome!

alexcanessa commented 6 years ago

Hello @classyentrepreneur glad you're enjoying it!

Unfortunately, there is not an option that allows this scenario right now.

Something that could help would be to have a --config-file option and have two different npm scripts

sergeysedykh commented 6 years ago

Something that could help would be to have a --config-file option and have two different npm scripts

I'm afraid, I don't understand :( Would you be so kind to provide some more details on how I could set it up?

Thanks a ton!

alexcanessa commented 6 years ago

Sorry I'll try to explain better:

Right now there isn't a way of achieving it in a clean way. The solution would be for us to create a --config option to select a different configuration file and therefore templates. At that point you could run:

# release uses default configuration file
gren release
# changelog uses a different one
gren changelog --config=.grenrc.changelog.js

I've created an issue to address it (#152).


... in the mean time ...

There is a manual and "hacky" way you can achieve this:

You might know that gren can be installed globally and from everywhere. What you need to do is (assuming you were releasing for this repo):

# "somedir" contains a .grenrc.js file with the configuration for the changelog
cd ~/somedir
# Run gren from that folder. It will use the configuration file available there
gren changelog --username=github-tools --repo=github-release-notes
sergeysedykh commented 6 years ago

Thanks for the clarification!

I'm afraid, I already have the config file in the project folder used for the release notes :(