summaryrefslogtreecommitdiffstats
path: root/routers/repo/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r--routers/repo/pull.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 8d0dbecfbf..bb5237400a 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -314,7 +314,7 @@ func CompareAndPullRequestPost(ctx *middleware.Context, form auth.CreateIssueFor
attachments []string
)
- _, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx)
+ headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx)
if ctx.Written() {
return
}
@@ -351,12 +351,13 @@ func CompareAndPullRequestPost(ctx *middleware.Context, form auth.CreateIssueFor
Content: form.Content,
}
if err := models.NewPullRequest(repo, pr, labelIDs, attachments, &models.PullRepo{
- HeadRepoID: headRepo.ID,
- BaseRepoID: repo.ID,
- HeadBarcnh: headBranch,
- BaseBranch: baseBranch,
- MergeBase: prInfo.MergeBase,
- Type: models.PULL_REQUEST_GOGS,
+ HeadRepoID: headRepo.ID,
+ BaseRepoID: repo.ID,
+ HeadUserName: headUser.Name,
+ HeadBarcnh: headBranch,
+ BaseBranch: baseBranch,
+ MergeBase: prInfo.MergeBase,
+ Type: models.PULL_REQUEST_GOGS,
}, patch); err != nil {
ctx.Handle(500, "NewPullRequest", err)
return