forked from Esqarrouth/EZSwiftExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dangerfile
22 lines (18 loc) · 804 Bytes
/
Dangerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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
# 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
xcode_summary.report 'xcodebuild-ios.json'
xcode_summary.report 'xcodebuild-tvos.json'