Today I Learned
Search…
Get Release notes from Github API
Posted on 18 Sep, 2021
Getting release notes for your favourite tool is a piece of cake using the GitHub Releases API​
1
REMOTE_REPO="Bhupesh-V/ugit"
2
curl -s -L https://api.github.com/repos/$REMOTE_REPO/releases | awk -F=":" '/body/ {print $1;exit}' | cut -d ':' -f 2 | tr -d "\""
Copied!
Note that the curl to the /releases endpoint will give all the releases. But we only want the latest changelog here. awk -F=":" '/body/ {print $1;exit}' will get the first release which is stored inside the body property and exit immediately.
Copy link
Edit on GitHub