From f7c175c57882f5c22f84c8a89982a2d0e89b1e11 Mon Sep 17 00:00:00 2001 From: Sebastian Florek Date: Thu, 12 Dec 2024 17:04:07 +0100 Subject: [PATCH] allow templating source field in pr automation --- pkg/pr/creates.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/pr/creates.go b/pkg/pr/creates.go index 5e7502684..62b7da98e 100644 --- a/pkg/pr/creates.go +++ b/pkg/pr/creates.go @@ -21,6 +21,9 @@ func applyCreates(creates *CreateSpec, ctx map[string]interface{}) error { if tpl.External { source = filepath.Join(creates.ExternalDir, source) } + if templatedSource, err := templateReplacement([]byte(source), ctx); err == nil { + source = string(templatedSource) + } destPath := []byte(tpl.Destination) dest, err := templateReplacement(destPath, ctx)