Forbid merge commits in pr

This commit is contained in:
Olexii Pyvovarov 2016-10-06 15:49:05 +03:00
parent 2e4b498b82
commit 042aba8452
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,9 @@
# Contributors should write up some reasoning about the PR, rather than just leave a title
if github.pr_body.length < 5
fail "Please provide a summary in the Pull Request description"
end
# Ensure a clean commits history
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
fail('Please rebase to get rid of the merge commits in this PR')
end