From 240143633c29fb3e1d123a0b2ea52a8ae4338516 Mon Sep 17 00:00:00 2001 From: Lucas C Date: Wed, 4 Aug 2021 16:34:44 -0300 Subject: [PATCH] Fixing apply permission when MR status is draft (#1736) --- server/events/vcs/gitlab_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/events/vcs/gitlab_client.go b/server/events/vcs/gitlab_client.go index 3abff3adf..d3f32373c 100644 --- a/server/events/vcs/gitlab_client.go +++ b/server/events/vcs/gitlab_client.go @@ -208,6 +208,7 @@ func (g *GitlabClient) PullIsMergeable(repo models.Repo, pull models.PullRequest if mr.MergeStatus == "can_be_merged" && mr.ApprovalsBeforeMerge <= 0 && mr.BlockingDiscussionsResolved && + !mr.WorkInProgress && (allowSkippedPipeline || !isPipelineSkipped) { return true, nil }