Don't look at check run results in other repositories #807
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are notified about check run completions via the
check_run
webhook event. This event contains apull_requests
field, which is a list of PRs that contain the SHA which just got checked:However (mainly but not exclusively), in the case of public repositories, this list can contain PRs in other repositories:
...this is because people can fork the repository and then create PRs from our repo into theirs. These PRs will contain SHAs from our repository and this causes them to appear in the
pull_requests
list of the check run, since they will share the same check run status in any repo: the check run is attached to the commit itself.These PRs should be ignored for our purposes. We aren't evaluating a policy on the remote repo. When a
check_run
completes, we are only interested in PRs for our own repo.