Use refs/merge-requests

https://github.com/drone/drone/issues/1931
This commit is contained in:
Bugagazavr 2017-02-08 08:43:55 +02:00 committed by GitHub
parent c77c7fabe8
commit 57b3752bd8

View file

@ -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