You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
When apply is run against a request that needs but does not have approval, atlantis comments this error:
Apply Failed: Pull request must be approved by at least one person other than the author before running apply.
However, at least on my setup (using Approval Rules in gitlab), what is says is not true: the person authoring the request can in fact approve it. This is a setting one could put in an Approval Rule in gitlab, but is not required.
I'm not sure if it's best to fix this by making this line more vague ("Pull request must be approved according to the project's approval rules") or by trying to figure out what those rules are per-VCS, that's up to the atlantis team.
Reproduction Steps
Open an MR in a context with Approval Rules and Approvals Required (in my case in gitlab, not sure how this affects other VCSs)
Type "atlantis apply" without approving, and this comment will come up
Environment details
If not already included, please provide the following:
Hi sorry I missed this comment; we are now running v0.23.3 and I have seen the issue. I also updated the link to the line in the code where I believe the issue is.
Community Note
Overview of the Issue
When
apply
is run against a request that needs but does not have approval, atlantis comments this error:Apply Failed: Pull request must be approved by at least one person other than the author before running apply.
Presumably from this line of code: https://github.com/runatlantis/atlantis/blob/main/server/events/command_requirement_handler.go#L25
However, at least on my setup (using Approval Rules in gitlab), what is says is not true: the person authoring the request can in fact approve it. This is a setting one could put in an Approval Rule in gitlab, but is not required.
Peeking at other VCSs (https://github.com/runatlantis/atlantis/tree/master/server/events/vcs) I don't see any code that makes sure that the user is different from the person that said approved. It seems like atlantis just trusts whatever the underlying VCS calls "approved".
I'm not sure if it's best to fix this by making this line more vague ("Pull request must be approved according to the project's approval rules") or by trying to figure out what those rules are per-VCS, that's up to the atlantis team.
Reproduction Steps
Environment details
If not already included, please provide the following:
Atlantis server-side config file:
Repo
atlantis.yaml
file:The text was updated successfully, but these errors were encountered: