Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Open PR for a specific commit
# Get PR number for a specific commit
local pr_number=$(git log --reverse --ancestry-path <commit_id>..master --grep="Merge pull request" --oneline | head -n 1 | awk '{print $5}' | sed -E 's/#//g')
# Open PR in the browser
open "https://github.tumblr.net/TumblrMobile/android2/pull/$pr_number"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment