Last active
December 10, 2019 19:17
-
-
Save nadavspi/0f9f59bdd8257c23e7f9357faaf64abf to your computer and use it in GitHub Desktop.
toddbc's release notes helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All non-merge commits | |
reg = /^(.+?)(\n|$)/; ' * ' + Array.prototype.slice.call(document.querySelectorAll('.commit-message a')).map(el => el.title).filter(title => title && title.indexOf('Merge') !== 0).map(title => { var mm = title.match(reg); return mm && mm[1]; }).join("\n * "); | |
// Only merge commits | |
reg = /^[^#]+(#[0-9]+)[^\n]+\n\n((?:.|\n)+)$/; Array.prototype.slice.call(document.querySelectorAll('.commit-message a')).map(el => el.title).filter(title => title.indexOf('Merge') === 0).map(title => { var mm = title.match(reg); return mm && mm[2] + ' (' + mm[1] + ')'; }).join("\n * "); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to use this script
1. Navigate to the Releases Tab and then click on the link for number of commits from the last release.
This will compare the latest release with the commits that have been created since release. We can then use this script to grab the commit messages. See below
2. Paste script here and run. This will output the release notes.
3. Copy Release notes and add to Release PR