Load PR Issue Poster on API too (#11033) (#11039)

* Load pr Issue Poster on API too (#11033)

* ajust for 1.11 codebase
pull/11049/head
6543 5 years ago committed by GitHub
parent 0c4be64345
commit e11b3a1076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      services/pull/merge.go

@ -285,6 +285,10 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor
return err
}
if err = pr.Issue.LoadPoster(); err != nil {
log.Error("LoadPoster: %v", err)
return fmt.Errorf("LoadPoster: %v", err)
}
sig := pr.Issue.Poster.NewGitSig()
if signArg == "" {
if err := git.NewCommand("commit", fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email), "-m", message).RunInDirTimeoutEnvPipeline(env, -1, tmpBasePath, &outbuf, &errbuf); err != nil {

Loading…
Cancel
Save