Skip to content

Instantly share code, notes, and snippets.

@robinst
Created September 8, 2017 05:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinst/ad2244f092c5241f06f563cf44d3336f to your computer and use it in GitHub Desktop.
Save robinst/ad2244f092c5241f06f563cf44d3336f to your computer and use it in GitHub Desktop.
Commands to help convert GitHub releases to CHANGELOG.md
# Get releases for your repository (change the URL and add user/password if necessary)
# If there's more than one page, you might have to do more requests with `?page=2` etc
curl https://api.github.com/repos/:owner/:repo/releases > releases.json
# Use jq! https://stedolan.github.io/jq/
# "v" is a prefix to strip from the release names, might not be necessary
jq -r '.[] | "## [" + (.name | ltrimstr("v")) + "] - " + .created_at[:10] + "\n" + .body' releases.json >> CHANGELOG.md
# Now edit the CHANGELOG.md, see here: http://keepachangelog.com/en/1.0.0/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment