Skip to content

Instantly share code, notes, and snippets.

@nickdos
Last active May 26, 2020 23:28
Show Gist options
  • Save nickdos/58b3bf42d1b62d32f7ba to your computer and use it in GitHub Desktop.
Save nickdos/58b3bf42d1b62d32f7ba to your computer and use it in GitHub Desktop.
Get list of commits for change log in GitHub (via latest release change page)

Browser bookmark

  • create a bookmark with a URL:
javascript:Array.from(document.getElementsByClassName("link-gray")).filter(x=>x.getAttribute('title')!=null).reduce((c,i)=>c+'* '+i.getAttribute('title').replace(/[\n\r]+/g," - ")+'<br>',"");
  • view the project's releases page
  • under the most recent release find the link that looks like N commits to master since this release and follow the link (noting the current version number for later)
  • run the bookmark from the bookmark menu
  • copy the MD text on the screen
  • "draft a new release" and paste the MD text into the release description

Old instructions

  • view the project's releases page (e.g. biocache-hubs)
  • under the most recent release find the link that looks like N commits to master since this release and follow the link (noting the current version number for later)
  • use the browser inspect feature to expose the developer tools and view the JS console
  • paste the JS one-liner into the console input and then copy the MD text output from the command:
Array.from(document.getElementsByClassName("link-gray")).filter(x => x.getAttribute('title') != null).reduce((c, i) => c + '* ' + i.getAttribute('title').replace(/[\n\r]+/g, " - ") + '\n', "");
  • return to the project's releases page and click the Draft a new release button (top-right)
  • Increment the version number in the Tag version input as well sa the Release title input (or give it a meaningful title, up to you)
  • paste the copied text from command into the large textarea input (optionally removing any irrelevant commits)
  • click the Publish release button at the bottom
Array.from(document.getElementsByClassName("link-gray")).filter(x => x.getAttribute('title') != null).reduce((c, i) => c + '* ' + i.getAttribute('title').replace(/[\n\r]+/g, " - ") + '\n', "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment