restrict modyfing one test and one extension per pr

This commit is contained in:
Olexii Pyvovarov 2016-10-07 12:57:15 +03:00
parent 042aba8452
commit 05bac810ee
1 changed files with 10 additions and 0 deletions

View File

@ -7,3 +7,13 @@ end
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
# Restrict changing only one extension per PR
if git.modified_files.grep(/^Sources\//).count > 1
fail("Please, modify only one extension per pull request.")
end
# Restrict changing only one test per PR
if git.modified_files.grep(/^EZSwiftExtensionsTests\//).count > 1
fail("Please, modify only one extension per pull request.")
end