From d21b974f6c416fd1f8415265fa6425b60860d7dd Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 10 Apr 2020 12:40:36 +0200 Subject: [PATCH] Load pr Issue Poster on API too (#11033) --- services/pull/merge.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/pull/merge.go b/services/pull/merge.go index b412e7189..2d4d9722e 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -337,6 +337,10 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge 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 {