From ebf1bd4f518971253e0a7a0e923645c1d584e03e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 1 Sep 2015 19:26:39 -0400 Subject: add view pull desc --- routers/repo/pull.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'routers/repo/pull.go') diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 8d0dbecf..bb523740 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 -- cgit v1.2.3