Skip to content

Commit

Permalink
allow templating source field in pr automation (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks authored Dec 12, 2024
1 parent a456248 commit 402cd15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/pr/creates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 402cd15

Please sign in to comment.