Skip to content

Commit 79ee666

Browse files
committed
fix
1 parent 58c634b commit 79ee666

File tree

16 files changed

+432
-727
lines changed

16 files changed

+432
-727
lines changed

Diff for: modules/templates/helper.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func NewFuncMap() template.FuncMap {
3131
"ctx": func() any { return nil }, // template context function
3232

3333
"DumpVar": dumpVar,
34+
"NIL": func() any { return nil },
3435

3536
// -----------------------------------------------------------------
3637
// html/template related functions

Diff for: routers/web/repo/compare.go

+2-10
Original file line numberDiff line numberDiff line change
@@ -788,19 +788,11 @@ func CompareDiff(ctx *context.Context) {
788788

789789
if !nothingToCompare {
790790
// Setup information for new form.
791-
retrieveRepoMetasForIssueWriter(ctx, ctx.Repo.Repository, true)
791+
pageMetaData := retrieveRepoIssueMetaData(ctx, ctx.Repo.Repository, nil, true)
792792
if ctx.Written() {
793793
return
794794
}
795-
labelsData := retrieveRepoLabels(ctx, ctx.Repo.Repository, 0, true)
796-
if ctx.Written() {
797-
return
798-
}
799-
RetrieveRepoReviewers(ctx, ctx.Repo.Repository, nil, true)
800-
if ctx.Written() {
801-
return
802-
}
803-
_, templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates, labelsData)
795+
_, templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates, pageMetaData)
804796
if len(templateErrs) > 0 {
805797
ctx.Flash.Warning(renderErrorOfTemplates(ctx, templateErrs), true)
806798
}

0 commit comments

Comments
 (0)