fix: Ignore apply check(s) even if missing from rollup when determining mergeability for GitHub #4974
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.
what
Ignores the atlantis/apply check even if it's missing in the API rollup response.
why
The previous implementation would only ignore the status of the atlantis/apply check, but the absence of the check (if required by ruleset or branch protection) would not be ignored.
In practice this hardly makes any difference since there are no normal situations where an apply would be attempted when the apply check was not already set (typically it would be set to PENDING by the preceding plan) and such attempts to apply would be rejected for other reasons anyway. However I think it would be best for this function to not rely on the check being created beforehand.
tests
Adds a test case for the situation when atlantis/apply is required by a ruleset, but the check is missing in the rollup response from GitHub.
references