mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-13 08:32:49 +02:00
Support title and body query parameters for new PRs
This commit is contained in:
parent
9b295e984a
commit
79a0303516
@ -804,6 +804,21 @@ func CompareDiff(ctx *context.Context) {
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
|
||||
title := ctx.FormString("title")
|
||||
body := ctx.FormString("body")
|
||||
expandNewPRForm := ctx.FormBool("quick_pull")
|
||||
|
||||
if title != "" {
|
||||
ctx.Data["TitleQuery"] = title
|
||||
}
|
||||
if body != "" {
|
||||
ctx.Data["BodyQuery"] = body
|
||||
}
|
||||
if expandNewPRForm || title != "" || body != "" {
|
||||
ctx.Data["ExpandNewPrForm"] = true
|
||||
}
|
||||
|
||||
_, templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates, pageMetaData)
|
||||
if len(templateErrs) > 0 {
|
||||
ctx.Flash.Warning(renderErrorOfTemplates(ctx, templateErrs), true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user