All supported GHES versions (3.16 through 3.20) support the checkRunCountsByState and statusContextCountsByState fields on StatusCheckRollupContextConnection. The slow path that iterated individual CheckContext nodes in ChecksStatus() is dead code. This commit: - Removes the slow path from ChecksStatus(), keeping only the aggregated counts-by-state path - Removes parseCheckStatusFromCheckConclusionState (no callers remain) - Removes CheckRunAndStatusContextCounts from PullRequestFeatures and its introspection detection - Consolidates the two feature detection introspection queries into one (PullRequest + WorkflowRun fits within the platform limit of two __type expressions) - Removes the errgroup dependency from feature detection - Always uses statusCheckRollupWithCountByState in pr status queries - Updates pr view fixtures to include counts-by-state fields Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
89 lines
2.5 KiB
JSON
89 lines
2.5 KiB
JSON
{
|
|
"data": {
|
|
"repository": {
|
|
"pullRequest": {
|
|
"number": 12,
|
|
"title": "Blueberries are from a fork",
|
|
"state": "OPEN",
|
|
"body": "**blueberries taste good**",
|
|
"url": "https://github.com/OWNER/REPO/pull/12",
|
|
"author": {
|
|
"login": "nobody"
|
|
},
|
|
"additions": 100,
|
|
"deletions": 10,
|
|
"assignees": {
|
|
"nodes": [],
|
|
"totalcount": 0
|
|
},
|
|
"labels": {
|
|
"nodes": [],
|
|
"totalcount": 0
|
|
},
|
|
"projectcards": {
|
|
"nodes": [],
|
|
"totalcount": 0
|
|
},
|
|
"milestone": {
|
|
"title": ""
|
|
},
|
|
"commits": {
|
|
"totalCount": 12
|
|
},
|
|
"baseRefName": "master",
|
|
"headRefName": "blueberries",
|
|
"headRepositoryOwner": {
|
|
"login": "hubot"
|
|
},
|
|
"isCrossRepository": true,
|
|
"isDraft": false,
|
|
"statusCheckRollup": {
|
|
"nodes": [
|
|
{
|
|
"commit": {
|
|
"oid": "abc",
|
|
"statusCheckRollup": {
|
|
"contexts": {
|
|
"checkRunCount": 2,
|
|
"checkRunCountsByState": [
|
|
{
|
|
"state": "SUCCESS",
|
|
"count": 1
|
|
},
|
|
{
|
|
"state": "FAILURE",
|
|
"count": 1
|
|
}
|
|
],
|
|
"statusContextCount": 0,
|
|
"statusContextCountsByState": [],
|
|
"nodes": [
|
|
{
|
|
"__typename": "CheckRun",
|
|
"conclusion": "SUCCESS",
|
|
"status": "COMPLETED",
|
|
"name": "cool tests",
|
|
"completedAt": "2020-08-27T19:00:12Z",
|
|
"startedAt": "2020-08-27T18:58:46Z",
|
|
"detailsUrl": "sweet link"
|
|
},
|
|
{
|
|
"__typename": "CheckRun",
|
|
"conclusion": "FAILURE",
|
|
"status": "COMPLETED",
|
|
"name": "sad tests",
|
|
"completedAt": "2020-08-27T19:00:12Z",
|
|
"startedAt": "2020-08-27T18:58:46Z",
|
|
"detailsUrl": "sweet link"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|