|
|
|
@@ -22,6 +22,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/notification" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/util" |
|
|
|
|
|
|
|
"github.com/Unknwon/com" |
|
|
|
) |
|
|
|
@@ -875,6 +876,16 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if util.IsEmptyString(form.Title) { |
|
|
|
PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch) |
|
|
|
if ctx.Written() { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplComparePull, form) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
patch, err := headGitRepo.GetPatch(prInfo.MergeBase, headBranch) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("GetPatch", err) |
|
|
|
|