1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

add view pull desc

This commit is contained in:
Unknwon
2015-09-01 19:26:39 -04:00
parent 8c046073a8
commit ebf1bd4f51
9 changed files with 43 additions and 28 deletions

View File

@@ -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