-
-
Save tangphillip/60cf16f6f96e4a224232 to your computer and use it in GitHub Desktop.
Find that Pull Request!
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
#!/bin/zsh | |
# Dependency: hub: https://github.com/defunkt/hub | |
find_pull_request() | |
{ | |
git rev-list --ancestry-path --reverse --grep="pull request" $1~1..HEAD | head -n 1 | xargs git cat-file commit | grep "pull request" | head -n 1 | sed "s/^.*#/pull\//" | sed "s/ .*$//" | xargs hub browse -- | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment