MCPcopy
hub / github.com/cli/cli / RequiredStatusCheckRollupGraphQL

Function RequiredStatusCheckRollupGraphQL

api/query_builder.go:270–312  ·  view source on GitHub ↗
(prID, after string, includeEvent bool)

Source from the content-addressed store, hash-verified

268}
269
270func RequiredStatusCheckRollupGraphQL(prID, after string, includeEvent bool) string {
271 var afterClause string
272 if after != "" {
273 afterClause = ",after:" + after
274 }
275 eventField := "event,"
276 if !includeEvent {
277 eventField = ""
278 }
279 return fmt.Sprintf(shortenQuery(`
280 statusCheckRollup: commits(last: 1) {
281 nodes {
282 commit {
283 statusCheckRollup {
284 contexts(first:100%[1]s) {
285 nodes {
286 __typename
287 ...on StatusContext {
288 context,
289 state,
290 targetUrl,
291 createdAt,
292 description,
293 isRequired(pullRequestId: %[2]s)
294 },
295 ...on CheckRun {
296 name,
297 checkSuite{workflowRun{%[3]sworkflow{name}}},
298 status,
299 conclusion,
300 startedAt,
301 completedAt,
302 detailsUrl,
303 isRequired(pullRequestId: %[2]s)
304 }
305 },
306 pageInfo{hasNextPage,endCursor}
307 }
308 }
309 }
310 }
311 }`), afterClause, prID, eventField)
312}
313
314var sharedIssuePRFields = []string{
315 "assignees",

Callers 1

populateStatusChecksFunction · 0.92

Calls 1

shortenQueryFunction · 0.85

Tested by

no test coverage detected