https://www.runatlantis.io/ logo
Title
w

Wendell Beckwith

04/18/2023, 8:15 PM
We have a situation where we use GitHub and after a PR has been approved but before
atlantis apply
has been commented on the PR, a dev might merge the PR. Is there a way to prevent the PR from being merged until after
atlantis apply
? Or even just require Atlantis to do the merging and closing of the PR after a successful apply.
b

Bruno Schaatsbergen

04/18/2023, 8:51 PM
You could make a branch protection rule to require specific status checks to be successful, e.g. the
atlantis apply
status check that's reported back to GitHub.
👍 1
1
b

Ben Parafina (grimaldi)

04/18/2023, 8:51 PM
yep branch protection rule on status checks
w

Wendell Beckwith

04/18/2023, 8:51 PM
We just moved into GH, so still a lot to learn. Thnx.
b

Ben Parafina (grimaldi)

04/18/2023, 8:52 PM
another way to goose that is usage of CODEOWNERS
they might be approvers but not have merge rights
1
that way you can groom the outbound PRs
b

Bruno Schaatsbergen

04/18/2023, 8:53 PM
Added to Ben and my answer: It's worth noting that branch protection rules are only available for paid teams on GitHub, if I remember correctly. If you're not on a paid team, you can still limit permissions to control who has merge rights, and you can consider allowing only Atlantis to merge using the automerge feature as an option.
g

Gabor Maghera

04/19/2023, 12:36 AM
Can we do this with GitLab too?
The status check.
n

Neil Davies

04/19/2023, 12:59 AM
ooo, I'd love to be able to block merges without an apply but have not figured out how to do that yet