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:
https://github.com/github/branch-deploy/blob/43afd75c657a06c55c953cc7af493d9cf565aa43/src/functions/prechecks.js#LL151
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
}
}
}
}
}
}
}
}
}
}
At the moment deploys are blocked on all status checks passing, even if they're not required.
This is because
statusCheckRollup.statedoesn't care about whether a check is required or not:https://github.com/github/branch-deploy/blob/43afd75c657a06c55c953cc7af493d9cf565aa43/src/functions/prechecks.js#LL151
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: