File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717//
1818// You'll need a GitHub token, you can re-use this one:
1919//
20- // e622517d9f1136ea8900 07c6373666312cdfaa69
20+ // 0a7d5c3cad9a6dbec2d9 9a5222cf49062a4c1ef7
2121//
2222// (Just remove the space)
2323//
@@ -29,9 +29,16 @@ const {markdown, danger} = require('danger');
2929const fetch = require ( 'node-fetch' ) ;
3030
3131const { generateResultsArray} = require ( './scripts/rollup/stats' ) ;
32- const { readFileSync} = require ( 'fs' ) ;
32+ const { existsSync , readFileSync} = require ( 'fs' ) ;
3333const { exec} = require ( 'child_process' ) ;
3434
35+ if ( ! existsSync ( './scripts/rollup/results.json' ) ) {
36+ // This indicates the build failed previously.
37+ // In that case, there's nothing for the Dangerfile to do.
38+ // Exit early to avoid leaving a redundant (and potentially confusing) PR comment.
39+ process . exit ( 0 ) ;
40+ }
41+
3542const currentBuildResults = JSON . parse (
3643 readFileSync ( './scripts/rollup/results.json' )
3744) ;
You can’t perform that action at this time.
0 commit comments