Skip to content

Commit

Permalink
style: 💄 fix comment format
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Oct 3, 2024
1 parent 46baa9c commit dbaaa3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/environment/createPlanSummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/environment/createPlanSummary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dbaaa3f

Please sign in to comment.