Skip to content

Instantly share code, notes, and snippets.

@hypest
Last active June 27, 2016 07:24
Show Gist options
  • Save hypest/470367456b5f1aa12cbc9f1060bd7767 to your computer and use it in GitHub Desktop.
Save hypest/470367456b5f1aa12cbc9f1060bd7767 to your computer and use it in GitHub Desktop.
get my PR titles since most recent release branch tag in history
loginname=hypest; git fetch --all; latest_release=`git branch -r --sort=version:refname | grep 'origin/release' | tail -n1`; repo=`git remote -v | grep "^origin" | grep "fetch" | sed -n -e 's/.*github.com:\(.*\)\.git .*$/\1/gp'`;git log --merges --oneline $latest_release.. | grep "pull request" | sed -n -e 's/.* pull request #\([0-9]*\) .*$/\1/gp' | xargs -I PRNUM ok.sh _get https://api.github.com/repos/$repo/pulls/PRNUM | jq -r "if .user.login == \"$loginname\" then .title else empty end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment