aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432020-04-11 06:10:16 +0200
committerGitHub2020-04-11 01:10:16 -0300
commite11b3a10760aceb318a6c39042f30854d62d23ad (patch)
treec7d864980699b2a70afd9d5a4d0b48b46b1bd03b
parent0c4be64345b0daa83b8af33828281acb27038164 (diff)
Load PR Issue Poster on API too (#11033) (#11039)
* Load pr Issue Poster on API too (#11033) * ajust for 1.11 codebase
-rw-r--r--services/pull/merge.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index b71784f00..0785d595c 100644
--- a/services/pull/merge.go
+++ b/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 {