Skip to content

Commit 666d50d

Browse files
noahbenhamSimenB
authored andcommitted
chore(ci): ensure new rules include README changes
1 parent edbd1a2 commit 666d50d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dangerfile.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ const { danger, fail } = require('danger');
77
if (danger.github.pr.body.length === 0) {
88
fail('Please include a body for your PR');
99
}
10+
11+
if (
12+
danger.git.created_files.find(filename => filename.startsWith('rules/')) &&
13+
!danger.git.modified_files.includes('README.md')
14+
) {
15+
fail('Please update the README when new rules are added');
16+
}

0 commit comments

Comments
 (0)