From 87f2cb28d704b1e0851d3c12acc781292c73e730 Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:24:25 +0000 Subject: [PATCH] fix: ensure that github actions are not overwritten Users should be able to edit those files as please them. If we do not skip then, they might can lose their customizations. We should not allow overwritten in this one --- .../golang/v4/scaffolds/internal/templates/github/lint.go | 2 ++ .../golang/v4/scaffolds/internal/templates/github/test-e2e.go | 2 ++ .../golang/v4/scaffolds/internal/templates/github/test.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/lint.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/lint.go index a1d950a14e0..909d8a3278d 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/lint.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/lint.go @@ -38,6 +38,8 @@ func (f *LintCi) SetTemplateDefaults() error { f.TemplateBody = lintCiTemplate + f.IfExistsAction = machinery.SkipFile + return nil } diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test-e2e.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test-e2e.go index e7e3858e386..f2a031a2742 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test-e2e.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test-e2e.go @@ -38,6 +38,8 @@ func (f *E2eTestCi) SetTemplateDefaults() error { f.TemplateBody = e2eTestCiTemplate + f.IfExistsAction = machinery.SkipFile + return nil } diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test.go index 5e27ddba111..8e1dfdf5fe3 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/github/test.go @@ -38,6 +38,8 @@ func (f *TestCi) SetTemplateDefaults() error { f.TemplateBody = testCiTemplate + f.IfExistsAction = machinery.SkipFile + return nil }