Pull Request Release Notes
Pull Request Release Notes utility generates release notes for all merged pull requests, on a specific branch, that have not yet been released relying solely on pull request titles and labels to generate the release notes and publish them in markdown format.
Supported Pull Request providers are GitHub, GitLab, Azure DevOps Services / Server, BitBucket Cloud and Bitbucket Server.
Intention is to run this utility as part of a continuous integration process and generate notes automatically as part of every release branch build. Optionally the utility can also publish the notes to a markdown file, Atlassian Confluence page or a Slack post.
Command line, YAML file parameters and Environment variables
See HELP.md for details on parameters.
Release Notes Format
Utility outputs release notes following the Semantic Release Notes format and extracts semantic release note sections, categories and summaries from the pull request title and labels. For example all pull requests with Bug
label can be grouped under Fixes
section and pull requests with Enhancement
label can be grouped under Enhancements
section. Category grouping is possible through use of the #Label
where #
character is used to denote a category label as opposed to a section label. BitBucket Cloud / Server pull request providers do not have a label concept yet so for those providers you can type [#section]
and [##category]
either in the title or the description of the pull request as a pseudo-label.
Release note formatting can be further customised where you can turn off grouping by section and category, order the release notes based on merged or created time of pull request and the format of the release note itself. Version number can be supplied via GitVersion tool.
You can also define a label to exclude pull request from release notes. Also you can define a label that when not added to a pull request will add a release note highlighted as code. This can be useful for scenarios such as QA team adding a QC label to a pull request so then it is easy to spot which items haven't gone through QC.
See HELP.md for all the details on how perform these customisations.
.NET Core Global Tool Install
dotnet tool install -g PullRequestReleaseNotes.DotNetCore
.NET Core Global Tool Usage
While inside a git working directory run the application
$ dotnet-pullrequestreleasenotes -GitHubToken c03b77a4982d48f0af328312a9b99455
Linux note
Only tested on Ubuntu 18.04 (Bionic) and 20.04 (Focal Fossa). You will need to run sudo apt-get install libgit2-dev
and sudo ln -s /usr/lib/x86_64-linux-gnu/libgit2.so /usr/lib/x86_64-linux-gnu/libgit2-572e4d8.so
to ensure libgit2 library can be found by the app. This is expected to be resolved in a future version of LibGit2Sharp.
Chocolatey Install
choco install PullRequestReleaseNotes
Chocolatey Usage
While inside a git working directory run the application
$ PullRequestReleaseNotes -GitHubToken c03b77a4982d48f0af328312a9b99455
PullRequestReleaseNotes in action
Sample Markdown Output
# 1.2.5 (MASTER) - XX XXX 2016
## Enhancements
### Category A
- Awesome new feature [\#1854](https://github.com/org/repo/pull/1854)
### Undefined
- Special feature for Acme Co [\#1855](https://github.com/org/repo/pull/1855)
## Fixes
### Category Z
- Fixed problem with widget [\#1792](https://github.com/org/repo/pull/1792)
### Category Y
- Fixed exception with view layout [\#1848](https://github.com/org/repo/pull/1848)
### Undefined
- Fixed spelling mistake [\#1833](https://github.com/org/repo/pull/1833)
## Unclassified
### Undefined
- Added new Category H [\#1843](https://github.com/org/repo/pull/1843)
Sample Actual Markdown
1.2.5 (MASTER) - XX XXX 2016
Enhancements
Category A
- Awesome new feature #1854
Undefined
- Special feature for Acme Co #1855
Fixes
Category Z
- Fixed problem with widget #1792
Category Y
- Fixed exception with view layout #1848
Undefined
- Fixed spelling mistake #1833
Unclassified
Undefined
- Added new Category H #1843
Sample GitHub Input
Other pull request provider samples
Azure DevOps Services & Server
Sample Confluence Output
Sample Slack Output
Thanks
Big thanks to Jake Ginnivan for inspiring this tool with his work on GitReleaseNotes and GitVersion
Also many thanks to:
- Edward Thomson for Infinity.NET that made it super-easy to connect to TFS.
- Adam Abdelhamed for PowerArgs that made command line argument parsing so easy it hurts.
- Mitja Bezenšek for SharpBucket that provided a pain-free way to connect to BitBucket.
- Antoine Aubry for YamlDotNet which made use of YAML format for the application configuration file as trivial as a yawn.
- Anthony van der Hoorn & Nik Molnar for creating Semantic Release Notes
- All contributors of RestSharp which is a swiss-army knife of REST clients and life without it would be meaningless. (bows)
- All contributors of LibGit2Sharp which made it possible to traverse a Git repo history to find all unreleased commits
- JetBrains for supporting this open source project by donating a free ReSharper license