-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-allow-mergeable-bypass-apply checks all statuses #3097
Comments
Looking at https://github.com/runatlantis/atlantis/pull/2436/files#diff-8f27c369fd18d57f78cad1008481a28ce841f08630c69d9c9bbec37c0574dd6aR323-R330, it looks like Atlantis iterates through all statuses (not just required ones for merge), and if any are |
I think we need to look at the problem of those statuses that stay as Please feel free to propose a PR. |
I think that Repository Rules (changelog) will allow us to get rid of this whole feature. It should be possible to create a separate rule that requires A couple of considerations:
|
Repository rules would be ideal. @edbighead did some sleuthing and found that switching from branch protection to repository rules is not currently possible due to our reliance on GetBranchProtection atlantis/server/events/vcs/github_client.go Line 417 in 6ff0e2f
|
It would be possible to scrape all this code behind the feature flag if only GitHub would implement Unfortunately, they know that they lack such API call but never promised to implement it :( |
FYI, this is also what's blocking #4116 (see also this thread). |
Community Note
Overview of the Issue
When running
atlantis apply
with--gh-allow-mergeable-bypass-apply
enabled, Atlantis responds with "Apply Failed: Pull request must be mergeable before running apply.".In the Github UI, all status checks (apart from
atlantis/apply
) are successful, but when querying the GH API, several statuses are not"state": "success"
;e.g. (removed PII):
Reproduction Steps
In my PR, first I tried to
atlantis apply
when someone other than a CODEOWNER approved the PR, and then got a codeowner to approve, and thenatlantis apply
again.Note that we also have a GH Action that runs on every commit that formats/lints and re-commits back to the repo - possibly this may have caused these
pending
actions.Logs
Environment details
Atlantis version: 0.22.3
Running Atlantis in Hashicorp Nomad
Additional Context
The text was updated successfully, but these errors were encountered: