How to automate your product's release notes like a badass

Release notes are great to keep your users updated. But writing them is boring. Let’s see how we can create them automatically!

As we are lining up to provide the best experience to our partners in the use of our software studio, we decided several months ago to publish official release notes every week. We wanted them to discover our new features, and be aware of the bugs that were fixed.

Our release process is quite simple, following the usual GitFlow with one development branch (dev), one unstable branch (next) and one stable branch (master). Each feature or bug fix being a Pull Request on GitHub, the release notes are quite easy to write reading the list of commits between two versions.

So we wrote them manually for only a couple of weeks before we decided to automate that process :D If you’re also following this standard branching model, we’re releasing this small utility written in node for you to use in your projects.

Here is the repo: ToucanToco/release-notes-generator

What does it do? E.g. give him a Pull Request from dev to master (i.e. a release), and it will find all PRs that have been merged in between, and generates nice release notes. This changelog is categorized using the labels you can assign to your features- and/or bugs- pull requests.

An example of release notes generation:

$ npm start -- release-notes --owner ToucanToco --repo my-app --pr 666 --log ## New features #645 Login with EvilOAuth provider #664 Pandas background everywhere \o/ #665 Add an gorgeous button to calculate the ultimate answer to the untimate question ## Fixes #663 Prevent unwanted logout when clicking 10 times on panda's nose ## Miscellanous #660 Document the nasty function that everyone uses to make coffee

Even better:

$ npm start -- prepare-release --owner ToucanToco --repo my-app --pr 666 # Will silently create or update the PR from dev to master # and fill the releases notes in the description of the PR

More info in the README ;)

That’s all folks! Contributions are welcomed!

P.S.: don’t forget to use the excellent Codename generator to find cute names for your releases!