added changelog danger rule

This commit is contained in:
Aleksey Pivovarov 2016-11-22 22:26:56 +02:00 committed by Olexii Pyvovarov
parent b45a1e0689
commit 733fed1a7e
1 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,12 @@
#Ensure changelog entry
unless github.pr_body.include? "- [x] Trivial change (doesn't require changelog)"
if (git.modified_files.grep(/^Sources\//).count > 0) || (github.pr_body.include? "- [x] New Extension")
if git.modified_files.grep(/^CHANGELOG.md/).count == 0
fail("Making non-trivial change requires changelog entry! Please, set trivial change or add entry to changelog.")
end
end
end
# Contributors should write up some reasoning about the PR, rather than just leave a title # Contributors should write up some reasoning about the PR, rather than just leave a title
if github.pr_body.length < 5 if github.pr_body.length < 5
fail "Please provide a summary in the Pull Request description" fail "Please provide a summary in the Pull Request description"