File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 17
17
//
18
18
// You'll need a GitHub token, you can re-use this one:
19
19
//
20
- // e622517d9f1136ea8900 07c6373666312cdfaa69
20
+ // 0a7d5c3cad9a6dbec2d9 9a5222cf49062a4c1ef7
21
21
//
22
22
// (Just remove the space)
23
23
//
@@ -29,9 +29,16 @@ const {markdown, danger} = require('danger');
29
29
const fetch = require ( 'node-fetch' ) ;
30
30
31
31
const { generateResultsArray} = require ( './scripts/rollup/stats' ) ;
32
- const { readFileSync} = require ( 'fs' ) ;
32
+ const { existsSync , readFileSync} = require ( 'fs' ) ;
33
33
const { exec} = require ( 'child_process' ) ;
34
34
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
+
35
42
const currentBuildResults = JSON . parse (
36
43
readFileSync ( './scripts/rollup/results.json' )
37
44
) ;
You can’t perform that action at this time.
0 commit comments