diff --git a/Dangerfile b/Dangerfile index d05297973..b20a179c3 100644 --- a/Dangerfile +++ b/Dangerfile @@ -8,6 +8,17 @@ warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" # Warn when there is a big PR warn("Big PR") if git.lines_of_code > 500 -# Don't let testing shortcuts get into master by accident -fail("fdescribe left in tests") if `grep -r fdescribe specs/ `.length > 1 -fail("fit left in tests") if `grep -r fit specs/ `.length > 1 +has_app_changes = git.modified_files.grep(%{apicast/}) +markdown_files = git.modified_files.grep(/\.md$/) + +if !git.modified_files.include?("CHANGELOG.md") && has_app_changes + fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md).") + message "Note, we hard-wrap at 80 chars and use 2 spaces after the last line." +end + +ENV['LANG'] = 'en_US.utf8' +prose.lint_files markdown_files - %w(CHANGELOG.md) + +# Look for spelling issues +prose.ignored_words = %w(s2i openresty APIcast nameservers resty-resolver nginx Redis OAuth ENV backend) +prose.check_spelling markdown_files - %w(CHANGELOG.md)