Created
March 31, 2021 00:01
-
-
Save necronet/2d43da09583884236683918824b3db9a to your computer and use it in GitHub Desktop.
Open PR for a specific commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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