From 83cc9cd68af9aea7936e7083664f49f1e8d3e725 Mon Sep 17 00:00:00 2001 From: Caio Augusto Date: Wed, 30 Oct 2024 23:37:09 -0300 Subject: [PATCH] fix: typo --- server/events/vcs/gitlab_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {