Skip to content

Instantly share code, notes, and snippets.

@lukechilds
Created October 25, 2022 11:41
Show Gist options
  • Save lukechilds/c09727ea9de261529b5309c75997f70f to your computer and use it in GitHub Desktop.
Save lukechilds/c09727ea9de261529b5309c75997f70f to your computer and use it in GitHub Desktop.
GitHub Compare to Release Notes

Generate pretty markdown release notes from GitHub compare view

Go to GitHub compare view between two release tags and dump the following in devtools:

copy(Array.from(document.querySelectorAll('#commits_bucket .Box-row')).map(e => {
    const commitTitle = e.querySelector('.Details p').textContent.replace(//g, '').trim();
    const authors = Array.from(e.querySelectorAll('.commit-author')).map(e => '@' + e.textContent);
    const commitUrl = e.querySelector('a[href*=\'/commit/\']').href;
    return `- ${commitTitle} - ${authors.join(' ')} ${commitUrl}`;
}).join('\n'));

You'll get markdown copied into your clipboard.

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