Closed
Description
At the moment deploys are blocked on all status checks passing, even if they're not required.
This is because statusCheckRollup.state
doesn't care about whether a check is required or not:
I don't know if there's an elegant way to check this 😢 (especially one that avoids paging through results). The best graphql I could come up with was this:
{
repository(owner: "github", name: "branch-deploy") {
pullRequest(number: 69) {
reviewDecision
commits(last: 1) {
nodes {
commit {
checkSuites {
totalCount
}
statusCheckRollup {
state
contexts(first: 100) {
nodes {
... on CheckRun {
isRequired(pullRequestNumber: 69)
conclusion
}
}
}
}
}
}
}
}
}
}