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.
User story
As a specific user for gitlab, I want approve a merge request like a validation before the requester apply the merge request via "atlantis apply" in comment.
Instead using the ApprovalsLeft field we could use the field ApprovedBy and looking for the username in an environnement variable in order to find one of approvers
Community Note
User story
As a specific user for gitlab, I want approve a merge request like a validation before the requester apply the merge request via "atlantis apply" in comment.
Behaviour
At the moment the code used for the approver validation use the field ApprovalsLeft with the condition approvals.ApprovalsLeft > 0
https://github.com/runatlantis/atlantis/blob/main/server/events/vcs/gitlab_client.go#L197
Maybe it's depending on edition but ApprovalsLeft value is always 0.
Solution
Instead using the ApprovalsLeft field we could use the field ApprovedBy and looking for the username in an environnement variable in order to find one of approvers
ATLANTIS_GITLAB_APPROVERS_LIST="gregory-v,eric-b"
Existing code
https://github.com/runatlantis/atlantis/blob/main/server/events/vcs/gitlab_client.go#L192
Code sample with environnement variable
Alternatives
Still with the ApprovedBy field we could looking for one of approver in atlantis.yaml file, we could set approvers list by directory ?
The text was updated successfully, but these errors were encountered: