Skip to content

Instantly share code, notes, and snippets.

@nadavspi
Last active December 10, 2019 19:17
Show Gist options
  • Save nadavspi/0f9f59bdd8257c23e7f9357faaf64abf to your computer and use it in GitHub Desktop.
Save nadavspi/0f9f59bdd8257c23e7f9357faaf64abf to your computer and use it in GitHub Desktop.
toddbc's release notes helpers
// 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 * ");
@avocadoslab
Copy link

image

@nadavspi
Copy link
Author

nadavspi commented Aug 4, 2017

Paste one of these into the console when comparing releases (follow the "34 commits to master since this release" link).

@keldri
Copy link

keldri commented Aug 9, 2017

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
image 2017-08-09 at 11 06 43 am public

2. Paste script here and run. This will output the release notes.

image 2017-08-09 at 11 08 53 am public

3. Copy Release notes and add to Release PR

image 2017-08-09 at 11 10 22 am public

@avocadoslab
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment