Skip to content

Commit

Permalink
Merge pull request harness#1934 from Bugagazavr/patch-7
Browse files Browse the repository at this point in the history
Use refs/merge-requests
  • Loading branch information
bradrydzewski committed Feb 8, 2017
2 parents c77c7fa + 57b3752 commit d0fb823
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions remote/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d0fb823

Please sign in to comment.