-
-
Save toddbc/22234a8c5ac70d5993158b847dd5c41f 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('#commits_bucket .Details 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('#commits_bucket .Details a:first-of-type')).map(el => el.title).filter(title => title.indexOf('Merge') === 0).map(title => { var mm = title.match(reg); return mm && mm[2] + ' (' + mm[1] + ')'; }).filter(Boolean).join("\n * "); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment