Allowing Skipped
GitHub status checks to count for the mergeable
command requirement, when that status check is a required
one
#4249
Labels
feature
New functionality/enhancement
Community Note
Describe the user story
Currently, when a GitHub status check is marked as a required status check and has the
skipped
result, it does not allow Atlantis to merge the PR, with the following error:Apply Failed: Pull request must be mergeable before running apply.
We have this use case that a required status check only gets a

pass
orfail
if a specific label is present on the PR.We want it to run on all PRs, but skip when some conditions are met.
Example of a skipped status check:
In this use case, Atlantis counts this PR as non-mergeable, providing the error above.
Describe the solution you'd like
I would like to add the possibility of allowing
skipped
status checks as a viable response for a mergeable PR.I believe that this would be feasible by changing these lines of code:
atlantis/server/events/vcs/github_client.go
Lines 469 to 475 in fc81a00
With something like:
The output of the

conclusion
field I got it from the GitHub API docs, with the response schema being shown below:Describe the drawbacks of your solution
This would mean that all skipped status checks would not be counted to the mergeable Atlantis verification, which might not be wanted in some use cases.
Describe alternatives you've considered
Changing the methodology we are currently using for the workflow that is being Skipped on these repos, but it's something we would like to avoid.
The text was updated successfully, but these errors were encountered: