zuul/zuul/driver/github/graphql/canmerge.graphql

55 lines
1017 B
GraphQL

query canMergeData(
$owner: String!
$repo: String!
$pull: Int!
$head_sha: String!
) {
repository(owner: $owner, name: $repo) {
branchProtectionRules(first: 100) {
nodes {
pattern
requiredStatusCheckContexts
requiresApprovingReviews
requiresCodeOwnerReviews
matchingRefs(first: 100) {
nodes {
name
}
}
}
}
pullRequest(number: $pull) {
isDraft
mergeable
reviewDecision
}
object(expression: $head_sha) {
... on Commit {
checkSuites(first: 100) {
nodes {
app {
name
slug
}
checkRuns(first: 100) {
nodes {
name
conclusion
}
}
}
}
status {
contexts {
creator {
login
}
state
context
}
}
}
}
}
}