Merge pull request #1934 from Bugagazavr/patch-7

Use refs/merge-requests
This commit is contained in:
Brad Rydzewski 2017-02-08 19:25:52 +07:00 committed by GitHub
commit d0fb823461

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