A gh extension to look up pull request(s) for commit SHA.
gh extension install andyfeller/gh-commit2prgh commit2pr- Profit! ๐ฐ ๐ธ ๐ค ๐ธ ๐ฐ
$ gh commit2pr --help
Look up pull request(s) for commit SHA.
USAGE
gh commit2pr [flags] [ <SHA> ]
FLAGS
-a, --all List all pull requests associated with SHA; defaults to first
-d, --debug Enable debugging
-h, --help Display help usage
--hostname=string Hostname of the GitHub instance to authenticate with
-R, --repo=[HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
-w, --web Open pull request(s) in the browser
EXAMPLES
# Look up pull request for HEAD
$ gh commit2pr
# Look up pull request for commit on OWNER/REPO
$ gh commit2pr --repo=OWNER/REPO SHA
# Look up pull request for HEAD and open web browser
$ gh commit2pr --web
# Look up all pull requests for HEAD
$ gh commit2pr --all