So I have a list of commits SHAs to check. In a given commit SHA let's say 123ab45, I want to see if the commit is linked to a PR in the branch.
Is there any command that I can put to check that?
So I have a list of commits SHAs to check. In a given commit SHA let's say 123ab45, I want to see if the commit is linked to a PR in the branch.
Is there any command that I can put to check that?
This can be done with the GitHub CLI version 2.7 or above:
gh search prs 123ab45
This is also supported by the search functionality on github.com
.
Enter at least the first seven characters of the commit SHA into the Pull Request search bar, or navigate directly to this URL:
https://github.com/your-repo/pulls?q=is%3Apr+123ab45+
git
has no concept of "pull request". This is a feature that is added by services built on top of git
such as Github, Bitbucket, Gitlab, etc. There is no git
command to do what you ask. To do this you will need to use their tools and APIs. The exact solution here depends on which of these services you use.