From 57b3752bd8cf8378e663b65884696c4f744ee21d Mon Sep 17 00:00:00 2001 From: Bugagazavr Date: Wed, 8 Feb 2017 08:43:55 +0200 Subject: [PATCH] Use refs/merge-requests https://github.com/drone/drone/issues/1931 --- remote/gitlab/gitlab.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/remote/gitlab/gitlab.go b/remote/gitlab/gitlab.go index 5c0192023..f1da201ab 100644 --- a/remote/gitlab/gitlab.go +++ b/remote/gitlab/gitlab.go @@ -503,11 +503,7 @@ func mergeRequest(parsed *client.HookPayload, req *http.Request) (*model.Repo, * build.Commit = lastCommit.Id //build.Remote = parsed.ObjectAttributes.Source.HttpUrl - if obj.SourceProjectId == obj.TargetProjectId { - build.Ref = fmt.Sprintf("refs/heads/%s", obj.SourceBranch) - } else { - build.Ref = fmt.Sprintf("refs/merge-requests/%d/head", obj.IId) - } + build.Ref = fmt.Sprintf("refs/merge-requests/%d/head", obj.IId) build.Branch = obj.SourceBranch