Commit ef7bd8d7 authored by Xorima's avatar Xorima Committed by Dan Webb
Browse files

Standardise Danger (#111)

This commit will standardise the dangerfile and bring it in line with all other repositories
parent 96fa125c
# Reference: http://danger.systems/reference.html
# A pull request summary is required. Add a description of the pull request purpose.
# 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/
# Changelog must be updated for each pull request.
# Changelog must be updated for each pull request that changes code.
# Warnings will be issued for:
# Pull request with more than 400 lines of code changed
# Pull reqest that change more than 5 lines without test changes
# Failures will be issued for:
# Pull request without summary
# Pull requests with code changes without changelog entry
def code_changes?
code = %w(libraries attributes recipes resources)
code = %w(libraries attributes recipes resources files templates)
code.each do |location|
return true unless git.modified_files.grep(/#{location}/).empty?
end
......@@ -29,7 +31,7 @@ warn 'This is a big Pull Request.' if git.lines_of_code > 400
# Require a CHANGELOG entry for non-test changes.
if !git.modified_files.include?('CHANGELOG.md') && code_changes?
fail 'Please include a [CHANGELOG](https://github.com/sous-chefs/ossec/blob/master/CHANGELOG.md) entry.'
fail 'Please include a CHANGELOG entry.'
end
# A sanity check for tests.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment