How can I get GitHub PR id from commit hash? It is possible in git console or GitHub API?
To get the PR ID you will need to use the GitHub Search Issues API and first find the PR number and then you can use the PR number to find the PR id. Take note that a pull request will have a Pull Request ID and a separate Issue ID. Step 2: Use the PR number and repo details to find the PR ID.
# open the git config editor $ git config --global --edit # in the alias section, add ... [alias] lastcommit = rev-parse HEAD ... From here on, use git lastcommit to show the last commit's hash. Save this answer.
A commit is a discrete change to one or more files. It is a critical part of Git. A pull request is a request to merge one or more commits into a different branch. It is not part of Git; it is only part of GitHub (and similar services like BitBucket).
The commit SHA for example is: 7dd1bcf5f2f5eeed34cc2ec63053098fba302b6c
is:pr is:closed 7dd1bcf5f2f5eeed34cc2ec63053098fba302b6c
If the PR is not closed then remove is:closed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With