Merge pull request #1866 from bradrydzewski/master
switch github pr branch from source to target
This commit is contained in:
commit
f7eafb2094
2 changed files with 2 additions and 2 deletions
|
@ -237,7 +237,7 @@ func convertPullHook(from *webhook, merge bool) *model.Build {
|
||||||
Commit: from.PullRequest.Head.SHA,
|
Commit: from.PullRequest.Head.SHA,
|
||||||
Link: from.PullRequest.HTMLURL,
|
Link: from.PullRequest.HTMLURL,
|
||||||
Ref: fmt.Sprintf(headRefs, from.PullRequest.Number),
|
Ref: fmt.Sprintf(headRefs, from.PullRequest.Number),
|
||||||
Branch: from.PullRequest.Head.Ref,
|
Branch: from.PullRequest.Base.Ref,
|
||||||
Message: from.PullRequest.Title,
|
Message: from.PullRequest.Title,
|
||||||
Author: from.PullRequest.User.Login,
|
Author: from.PullRequest.User.Login,
|
||||||
Avatar: from.PullRequest.User.Avatar,
|
Avatar: from.PullRequest.User.Avatar,
|
||||||
|
|
|
@ -184,7 +184,7 @@ func Test_helper(t *testing.T) {
|
||||||
|
|
||||||
build := convertPullHook(from, true)
|
build := convertPullHook(from, true)
|
||||||
g.Assert(build.Event).Equal(model.EventPull)
|
g.Assert(build.Event).Equal(model.EventPull)
|
||||||
g.Assert(build.Branch).Equal(from.PullRequest.Head.Ref)
|
g.Assert(build.Branch).Equal(from.PullRequest.Base.Ref)
|
||||||
g.Assert(build.Ref).Equal("refs/pull/42/merge")
|
g.Assert(build.Ref).Equal("refs/pull/42/merge")
|
||||||
g.Assert(build.Refspec).Equal("changes:master")
|
g.Assert(build.Refspec).Equal("changes:master")
|
||||||
g.Assert(build.Remote).Equal("https://github.com/octocat/hello-world-fork")
|
g.Assert(build.Remote).Equal("https://github.com/octocat/hello-world-fork")
|
||||||
|
|
Loading…
Reference in a new issue