- Notifications
You must be signed in to change notification settings - Fork319
Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
License
github-tools/github-release-notes
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Github release notes and changelog generator
gren
is a small helpful robot that will do for you just create a release from a tag and compile the release notes using issues or commits.
It also can generate aCHANGELOG.md
file based on the release notes (or generate a brand new).
Everyone loves neat, transparent, informative release notes.Everyone would also rather avoid maintaining them. What a hassle to have to evaluate what issues have been solved between two points in project's timeline, what types of problems they were, are they important to inform the users about, what issues solved them, etc.
Wouldn't it be great to get fantastic release notes compiled for you automatically based on all the hard work you put into your GitHub issues and pull requests?
The main motivation for bringinggren
to life was the need for auto-generating release notes for every tag in a project.The process,as explained here, requires the tagger to go to your project's releases page in GitHub, draft that tag as a new release and manually add what has changed.
Letgren
take care of that for you. It automates this process and also writes release notes for you, creating something like this:
(yes, this is one of 🤖's actual releases)
Where is the data coming from? There are two options:
If you manage your project with issues, that's where all the information about a change are.Issue labels increase the level of depth of what the release notes should show, helpinggren
to group the notes.
e.g. if you see the example above, the issues are grouped by the two labelsenhancement
andbug
, then customised via a config file.
gren
generates those notes by collecting all the issues closed between a tag (defaults to latest) and the tag before it (or a tag that you specify).If you want to be more accurate on the issues that belong to a release, you can group them inmilestones and use only the issues that belong to that Milestone.
The output above is a result of release notes built from issues.
In order to have splendidly generated release notes, we recommend to follow these conventions:
- Start the title with a verb (e.g. Change header styles)
- Use the imperative mood in the title (e.g. Fix, not Fixed or Fixes header styles)
- Use labels wisely and assign one label per issue.
gren
has theoption to ignore issues that have one of the specified labels.
The simplest way of getting data is from the commits you write.Even though it doesn't require a machine-readable commit, it is still better to have them in a nice format.
The output then uses commit messages (title + description) to look something like:
- Filter milestones (#75)
- Create milestones data-source option
- Add documentation for the milestones option
- Support GitHub enterprise (#73)
- Support GitHub enterprise
- Add api-url to options documentation
- Update CHANGELOG.md
In order to have splendidly generated release notes, we recommend to follow these conventions:
- Start the subject line with a verb (e.g. Change header styles)
- Use the imperative mood in the subject line (e.g. Fix, not Fixed or Fixes header styles)
- Limit the subject line to about 50 characters
- Do not end the subject line with a period
- Separate subject from body with a blank line
- Wrap the body at 72 characters
- Use the body to explainwhat andwhy nothow
Installgithub-release-notes
via npm:
npm install github-release-notes -g
First, generate aGitHub token
,withrepo scope, atthis link.Then add this line to~/.bash_profile
(or~/.zshrc
):
export GREN_GITHUB_TOKEN=your_token_here
Show the internet that you use gren for automating your release notes ->
[](https://github-tools.github.io/github-release-notes/)
gren
gets the repo information directly from the folder wheregit
is initialised.
# Navigate to your project directorycd~/Path/to/repo# Run the task (see below)gren release
Otherwise, you can run itanywhere passing the repo information:
gren release --username=[username] --repo=[repo name]
If you don't want to save the token, you can specify one as an option:
gren release --token=[your token]
There are two main commands that can be ran with 🤖:
gren
will look for the latest tag, draft a new release using the issues closed between when that tag and the one before were created and publish that release in yourrelease panel in your GitHub repo. (@see how to feed 🤖).
Create aCHANGELOG.md
file using all the release notes of the repo(like the ones generated by 🤖).If the file exists already, use the--override
option to proceed.
gren changelog --override
To generate a brand new release notes, using the same approach as per the releases, you have to run the command with the--generate
option.
gren changelog --generate
gren
is usingCommander.js which generates the--help
section.To trigger the help of a command, run:
# General usagegren --help# Command usagegrenhelp release# or gren release --help
It's also possible to see all the exampleshere or directly in the terminal:
gren examples release
You can create a configuration file where the task will be run to specify your options.See how to set up the config fileThe accepted file extensions are the following:
.grenrc
.grenrc.json
.grenrc.yml
.grenrc.yaml
.grenrc.js
If you need help to create the configuration file, you can run the following command and follow the instructions
gren init
Thanks goes to these wonderful people (emoji key):
This project follows theall-contributors specification. Contributions of any kind welcome!
About
Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.