Find that Pull Request!
#!/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