From e11b3a10760aceb318a6c39042f30854d62d23ad Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 11 Apr 2020 06:10:16 +0200 Subject: [PATCH] Load PR Issue Poster on API too (#11033) (#11039) * Load pr Issue Poster on API too (#11033) * ajust for 1.11 codebase --- services/pull/merge.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/pull/merge.go b/services/pull/merge.go index b71784f00b..0785d595c9 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 {