-
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
apply_requirements are ignored when policy check is enabled and passes #2182
Comments
when |
I just noticed this happening and came to check if anyone else was having this issue. Same thing is happening to me, but I am not using policies. I can This feels like #1895 all over again |
I wonder if #2053 is causing this? I need to start rolling back versions and seeing when atlantis starts working correctly again. |
I rolled back to 0.19.1 and could still apply a PR with no approvals, not mergable. Thinking that the culprit is #2053, I skipped trying 0.19.0 and rolled back to 0.18.5 and things work again, it doesn't let me apply a non-mergable PR with no approvals. FYI, I'm using Github Enterprise. |
tested on latest 7199ea4, works as expected |
Community Note
Overview of the Issue
Atlantis allows apply when
mergeable
is not satisfied (Github).Reproduction Steps
repos.yaml
configRequire review from Code Owners
branch protectionatlantis apply
Even though
mergeable
condition is not being satisfied and Github API is returning"mergeable_state": "blocked"
from get-a-pull-request, the apply goes through.Potentially caused by
policies_passed
inapply_requirements
.Merge check is happening here:
atlantis/server/events/apply_requirement_handler.go
Lines 31 to 34 in 7199ea4
Mergeability status is fetched from Github API here:
atlantis/server/events/vcs/github_client.go
Lines 299 to 319 in 7199ea4
Logs
Obfuscated org and repo names.
Automerge is set to
true
, apply goes through regardless ofmergeable
status.Waiting on code owner review from ...
log entry tells indeed that this PR is not mergeable.Environment details
Atlantis v0.19.2
Additional Context
I was thoroughly reading the docs to get the answer but no luck. Spotted the error in docs #2170
The text was updated successfully, but these errors were encountered: