diff --git a/server/events/vcs/gitlab_client.go b/server/events/vcs/gitlab_client.go index 7c6c10f437..b182ef35bf 100644 --- a/server/events/vcs/gitlab_client.go +++ b/server/events/vcs/gitlab_client.go @@ -291,7 +291,7 @@ func (g *GitlabClient) PullIsApproved(logger logging.SimpleLogging, repo models. // PullIsMergeable returns true if the merge request can be merged. // In GitLab, there isn't a single field that tells us if the pull request is -// mergeable so for now we check the merge_status and ApprovalsLeft +// mergeable so for now we check the merge_status and approvals_left // fields. // In order to check if the repo required these, we'd need to make another API // call to get the repo settings. @@ -372,7 +372,7 @@ func (g *GitlabClient) PullIsMergeable(logger logging.SimpleLogging, repo models mr.DetailedMergeStatus == "need_rebase")) || (!supportsDetailedMergeStatus && mr.MergeStatus == "can_be_merged")) && //nolint:staticcheck // Need to reference deprecated field for backwards compatibility - approval.ApprovalsLeft <= 0 && + approval.ApprovalsLeft == 0 && mr.BlockingDiscussionsResolved && !mr.WorkInProgress && (allowSkippedPipeline || !isPipelineSkipped) {