This message was deleted.
# atlantis-community
s
This message was deleted.
c
I don't, but I image requiring it to be mergeable would cover that.
Assuming you require CODEOWNER approval for merging
l
mergeable is true, but 2 status checks fail. We did set
Copy code
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY=true
We’ve set the following in our ruleset: • Bypass: Atlantis • Target branch:
main
• Require a pull request before merging • Required Approvals: 1 • Require review from Code Owners • Status checks that are required:
atlantis/plan
,
atlantis apply
In atlantis, we’ve set
apply_requirements: [mergeable, undiverged]
I’m guessing I’m messing up a setting somewhere…
c
Hrm. I think that looks right to me...
l
That’s what we thought as well 🙂 Doesn’t seem to work though and we get the message in our PR: Ran Apply for dir:
xxx
workspace:
default
Apply Failed: Pull request must be mergeable before running apply.
When we check the PR API, we can see
"mergeable": true,
No idea what’s going on…
c
Hrm...when you say you set "bypass: atlantis" what do you mean by that exactly?
Do you have
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY
set to
true
in your configs?
I assumed the answer was yes, but that error looks like what you'd get if you didn't.
l
Yep, we have set that. The “bypass:atlantis” is set in the GitHub Ruleset, It allows the Atlantis App to bypass the ruleset.
c
Ah, okay.
Well, that all looks right to me at least. 😕
l
Hmm, ok, I’ll open an issue.
Thank you for your help! 😄
👍 1
s
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY
only works with branch protection API which is different from ruleset one. GitHub's API GetMergeableState() disregards who called it and always returns blocked in case like this with rulesets. There is no other API which can tell whether a PR can be merged by specific user, so nothing much can be done in Atlantis unfortunately. GitHub people are "aware of the problem" Long story short you still need to keep a version of branch protection in the repos that work with atlantis unfortunately.
ty 1
c
Ah...ugh.
o
we had to switch to rulesets because semantic-release that authenticates as a github app could not bypass branch protection rules, a trade off now is that atlantis can't bypass rulesets facepalm