API v3: What causes a check run/suite pull request field to be empty? #24820
-
I’m getting check run and check suite events without any pull requests associated with them. What does this mean and what causes it? I would have thought check runs and check suites are tightly coupled to pull requests. Any insight is greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
As stated in the documentation, check runs and suites are associated with a commit:
While one of the places where they are easiest to see in the GitHub UI is on a pull request, they’re tightly coupled to commits and not branches or PRs. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
It would be very helpful if there was a documented way to retrieve this information. In my use case I want to verify the commit messages and parse them to do some verification. The Pull Request contains a commits_url which I can use to get the commits compared to base. While I see a commit sha, I can’t find anything that tells me against which base this was submitted. |
Beta Was this translation helpful? Give feedback.
-
@daanikus through our company we filed a support issue with GitHub that I hope we get a response to soon. In summary I can confirm the behavior that you are seeing and can also provide repro steps. The issue is that the check run/suite pull request property is only populated with values on the very initial Pull Request creation step. If you do any other commits to that branch, after the PR was created, the check run/suite events pull_requests property will be empty for each of commit shas’ check runs/suites. You can confirm this pretty easily by taking a close look at the events submitted to your web hook/github app, and it definitely seems like a bug on their side. We are using GitHub Enterprise 2.16.4 here and based on their change log from 2.16 -> 2.18, it doesn’t seem they have specifically addressed this issue or just haven’t documented it. https://enterprise.github.com/releases/series/2.18 |
Beta Was this translation helpful? Give feedback.
As stated in the documentation, check runs and suites are associated with a commit:
While one of the places where they are easiest to see in the GitHub UI is on a pull request, they’re tightly coupled to commits and not branches or PRs.
I hope that helps!