Skip to content

Commit 10114cc

Browse files
authored
fix: [PIPE-21644]: Fix the issue to import the template from non default branch. (#1053)
1 parent 06a9bb4 commit 10114cc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changelog/1024.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:fix
2+
harness_platform_template: Fix the issue to import the template from non default branch.
3+
```

internal/service/platform/template/resource_template.go

+6
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ func resourceTemplateCreateOrUpdate(ctx context.Context, d *schema.ResourceData,
313313
version := d.Get("version").(string)
314314
template_yaml := d.Get("template_yaml").(string)
315315
is_stable := d.Get("is_stable").(bool)
316+
if attr, ok := d.GetOk("git_import_details"); ok {
317+
config := attr.([]interface{})[0].(map[string]interface{})
318+
if attr, ok := config["branch_name"]; ok {
319+
branch_name = attr.(string)
320+
}
321+
}
316322

317323
if id == "" {
318324

0 commit comments

Comments
 (0)