diff --git a/pkg/build/repo/repo.go b/pkg/build/repo/repo.go index d1af38fac..af8e677c0 100644 --- a/pkg/build/repo/repo.go +++ b/pkg/build/repo/repo.go @@ -107,7 +107,7 @@ func (r *Repo) Commands() []string { case len(r.PR) > 0: cmds = append(cmds, fmt.Sprintf("git fetch origin +refs/pull/%s/head:refs/remotes/origin/pr/%s", r.PR, r.PR)) - cmds = append(cmds, fmt.Sprintf("git checkout -qf pr/%s", r.PR)) + cmds = append(cmds, fmt.Sprintf("git checkout -qf -b pr/%s origin/pr/%s", r.PR, r.PR)) //cmds = append(cmds, fmt.Sprintf("git fetch origin +refs/pull/%s/merge:", r.PR)) //cmds = append(cmds, fmt.Sprintf("git checkout -qf %s", "FETCH_HEAD")) // if a specific commit is provided then we'll diff --git a/pkg/handler/hooks.go b/pkg/handler/hooks.go index f7aaed24b..8a572d19f 100644 --- a/pkg/handler/hooks.go +++ b/pkg/handler/hooks.go @@ -230,6 +230,7 @@ func (h *HookHandler) PullRequestHook(w http.ResponseWriter, r *http.Request) { commit.Status = "Pending" commit.Created = time.Now().UTC() commit.Gravatar = hook.PullRequest.User.GravatarId + commit.Author = hook.PullRequest.User.Login commit.PullRequest = strconv.Itoa(hook.Number) commit.Message = hook.PullRequest.Title // label := p.PullRequest.Head.Labe