From dbaaa3fd6212920e00a0b0de7dd0d12835c4fd95 Mon Sep 17 00:00:00 2001 From: jaskaransarkaria Date: Thu, 3 Oct 2024 15:00:24 +0100 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20fix=20comment=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/environment/createPlanSummary.go | 2 +- pkg/environment/createPlanSummary_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/environment/createPlanSummary.go b/pkg/environment/createPlanSummary.go index f7281c53..ca1241d7 100644 --- a/pkg/environment/createPlanSummary.go +++ b/pkg/environment/createPlanSummary.go @@ -56,7 +56,7 @@ func CreateCommentBody(tfPlan *tfjson.Plan) string { body = fmt.Sprintf(body, len(resourcesToCreate), len(resourcesToDelete), len(resourcesToUpdate), len(resourcesToReplace), len(resourcesUnchanged), details("create", "+", resourcesToCreate), details("destroy", "-", resourcesToDelete), details("update", "!", resourcesToUpdate), details("replace", "-+", resourcesToReplace)) if len(resourcesToCreate) == 0 && len(resourcesToReplace) == 0 && len(resourcesToUpdate) == 0 && len(resourcesToDelete) == 0 { - body = "\n```diff\n+ There are no terraform changes to apply```\n" + body = "\n```diff\n+ There are no terraform changes to apply\n```\n" } return body diff --git a/pkg/environment/createPlanSummary_test.go b/pkg/environment/createPlanSummary_test.go index 619b210e..20e80aea 100644 --- a/pkg/environment/createPlanSummary_test.go +++ b/pkg/environment/createPlanSummary_test.go @@ -104,7 +104,7 @@ func Test_CreateCommentBody(t *testing.T) { want string }{ { - "GIVEN a terraform plan with no changes THEN return a comment body stating so", args{tfNoChangesPlan}, "\n```diff\n+ There are no terraform changes to apply```\n", + "GIVEN a terraform plan with no changes THEN return a comment body stating so", args{tfNoChangesPlan}, "\n```diff\n+ There are no terraform changes to apply\n```\n", }, { "GIVEN a terraform plan with CREATE changes THEN return a comment body with correct changes", args{tfChangesPlan01}, createChangesExpected,