How to find a parent pull request by commit SHA on GitHub

Puzzled how this particular commit got into master? What to find pull request which it belonged to? Not such feature on Github?
Checkout this script, written on top of Github’s API: https://github.com/artgo/FindPullRequest
It allows to search closed pull requests to find the pull request which contained given commit.

How to use
Run findpr.sh from root directory of the repository. You have to specify the following arguments:
-U your_username_on_github
-P your_password_on_github
-R Company/Repository
-A username_of_author_of_pull_request
-C commit_id

Here -A is technically optional, but you’ll run out of allowed requests on github pretty soon if you won’t be specifying the author of pull request being searched, since requests rate limit in act, and we use one request per pull request to get list of commits.

Technically where is a Jar with API available for your use, however adding it to maven repository is on long-term roadmap unless you want to help me with it 🙂

Advertisements