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
Created https://github.com/pratiknikam/github-release-helper btw. Thanks @toddbc