bug: checks
input option is not respecting required checks in the pending state
#363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
This pull request fixes a bug (#362) that occurs when you have a "pending" ("Expected - waiting for status to be reported") CI check listed via the
checks
input option. This bug allows users to deploy when this check is pending when in reality, their deployments should have been rejected.The rationale here is that if a user has any checks listed under the
checks
input option explicitly, that those checks must be passing in order for a deployment to be allowed.Before
The deployment was allowed (incorrectly)
After
The deployment was rejected - some checks are still pending
Once that CI check passes (invoked via adding a label), the deployment will be allowed:
Additionally, this works even if the "check" is not marked as "required" via the branch protection (or ruleset) settings. So if a user has
checks: quality_gate
in their branch-deploy Action input options, and that check does not exist on a PR, it will still reject the deployment as the user would expect: