From 8e2e65f74a809e8e18efef12ef3176814f45eea5 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 16 May 2026 17:56:31 -0500 Subject: [PATCH] fix: add missing TemplateContext type definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The type was used throughout services/context but never defined — likely lost during upstream merge. It's a map[string]any that implements context.Context. Co-Authored-By: Claude Opus 4.6 (1M context) --- services/context/context_template.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/context/context_template.go b/services/context/context_template.go index aa07c83430..d3e60e35cd 100644 --- a/services/context/context_template.go +++ b/services/context/context_template.go @@ -17,6 +17,10 @@ import ( "code.gitea.io/gitea/services/webtheme" ) +// TemplateContext is a map that holds template rendering context data +// and implements context.Context for passing request-scoped values. +type TemplateContext map[string]any + var _ context.Context = TemplateContext(nil) func NewTemplateContext(ctx context.Context, req *http.Request) TemplateContext {