mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
enhance: fall back to DEFAULT_TEMPLATE.md when style-specific template is missing (#38803)
Closes #38801 Introduce `DEFAULT_TEMPLATE.md` as the default message for all merge styles. https://gitea.com/gitea/docs/pulls/491 By the way, fix incorrect os.Expand usage for merge message & repo template --------- Co-authored-by: waterWang <waterWang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
waterWang
wxiaoguang
parent
a34cc4cac4
commit
2657756cac
@@ -284,7 +284,7 @@ func handleViewIssueRedirectExternal(ctx *context.Context) {
|
||||
if extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == markup.IssueNameStyleNumeric || extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == "" {
|
||||
metas := ctx.Repo.Repository.ComposeCommentMetas(ctx)
|
||||
metas["index"] = ctx.PathParam("index")
|
||||
res, err := vars.Expand(extIssueUnit.ExternalTrackerConfig().ExternalTrackerFormat, metas)
|
||||
res, err := vars.ExpandCurlyBrace(extIssueUnit.ExternalTrackerConfig().ExternalTrackerFormat, metas)
|
||||
if err != nil {
|
||||
log.Error("unable to expand template vars for issue url. issue: %s, err: %v", metas["index"], err)
|
||||
ctx.ServerError("Expand", err)
|
||||
|
||||
Reference in New Issue
Block a user