Skip to content

Commit

Permalink
format js
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhar committed Jun 25, 2024
1 parent 6fd9613 commit a990dda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/comment_tf_output.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ ${process.env.tf_fmt}
// Re-prefix the lines with diff indicators based on the change type.
const changed_lines = tfplan
.split("\n")
.filter(line => line.startsWith(" # "))
.map(line => {
.filter((line) => line.startsWith(" # "))
.map((line) => {
const diff_line = line.slice(4);
if (diff_line.includes(" created")) return "+ " + diff_line;
if (diff_line.includes(" destroyed")) return "- " + diff_line;
if (diff_line.includes(" updated")) return "! " + diff_line;
if (diff_line.includes(" has been")) return "# " + diff_line;
if (diff_line.includes(" been")) return "# " + diff_line;
return diff_line;
});

Expand Down

0 comments on commit a990dda

Please sign in to comment.