Skip to content

Commit

Permalink
fix(diff-rendered-charts): added check to exit script if no diff file…
Browse files Browse the repository at this point in the history
… exists
  • Loading branch information
dlactin committed Mar 8, 2024
1 parent a6adb85 commit ab75725
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/diff-rendered-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,14 @@ jobs:
script: |
const fs = require('fs');
const comment_char_limit = 65536; // GitHub comment character limit
const diff = fs.readFileSync('diff.log', 'utf8');
const diff_file = 'diff.log';
if (fs.existsSync(diff_file)) {
var diff = fs.readFileSync(diff_file, 'utf8');
} else {
console.log(diff_file + " not found")
return
}
function splitComment(comment, maxSize, sepEnd, sepStart, comStart) {
// Adapted from Atlantis SplitComment function
Expand Down Expand Up @@ -167,4 +174,4 @@ jobs:
repo: context.repo.repo,
body: comment
})
}
}

0 comments on commit ab75725

Please sign in to comment.