Skip to content

Commit f1a6348

Browse files
xorimadamacus
authored andcommitted
Standardise Danger (sous-chefs#250)
This commit will standardise the dangerfile and bring it in line with all other repositories
1 parent bc60698 commit f1a6348

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Dangerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Reference: http://danger.systems/reference.html
22

33
# A pull request summary is required. Add a description of the pull request purpose.
4-
# Add labels to the pull request in github to identify the type of change. https://help.github.com/articles/applying-labels-to-issues-and-pull-requests/
5-
# Changelog must be updated for each pull request.
4+
# Changelog must be updated for each pull request that changes code.
65
# Warnings will be issued for:
76
# Pull request with more than 400 lines of code changed
87
# Pull reqest that change more than 5 lines without test changes
8+
# Failures will be issued for:
9+
# Pull request without summary
10+
# Pull requests with code changes without changelog entry
911

1012
def code_changes?
11-
code = %w(libraries attributes recipes resources)
13+
code = %w(libraries attributes recipes resources files templates)
1214
code.each do |location|
1315
return true unless git.modified_files.grep(/#{location}/).empty?
1416
end
@@ -29,7 +31,7 @@ warn 'This is a big Pull Request.' if git.lines_of_code > 400
2931

3032
# Require a CHANGELOG entry for non-test changes.
3133
if !git.modified_files.include?('CHANGELOG.md') && code_changes?
32-
fail 'Please include a [CHANGELOG](https://github.com/sous-chefs/line-cookbook/blob/master/CHANGELOG.md) entry.'
34+
fail 'Please include a CHANGELOG entry.'
3335
end
3436

3537
# A sanity check for tests.

0 commit comments

Comments
 (0)