Scenario: I receive a status webhook event from GitHub. I want to find any Pull Requests associated with the commit.
The StatusEvent contains the commit .SHA
and a .Repo
(Respository) object. This appears to be sufficient to find applicable PRs.
Issue: If the status
event is triggered in response to checks performed on a PR in a respository separate from the commit, there are problems...
Attempt 1: The go-github package contains a PullRequestsService with .ListPullRequestsWithCommit method calling this GitHub API method. Unfortunately, this only seems to return PRs within the repo containing the commit. Meaning, it appears to ignore PRs created with commits from forked repos.