forked from SwifterSwift/SwifterSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dangerfile
24 lines (16 loc) · 929 Bytes
/
Dangerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
message(“Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.“)
# Checks for modified source files
source_changes_exist = !git.modified_files.grep(/Sources/).empty?
# Checks for changelog entry
no_changelog_entry = !git.modified_files.include?("CHANGELOG.md")
# Checks for tests
no_test_changes = !git.modified_files.grep(/Tests/).empty?
if source_changes_exist && no_test_changes
warn(“Consider adding tests for new extensions or updating existing tests for a modified SwifterSwift extension”)
end
if source_changes_exist && no_changelog_entry
warn(“The source files have been modified. Please consider adding a CHANGELOG entry if necessary.“)
end
swiftlint.lint_files
# Checks if pull request is labeled as [WIP]
warn(“This pull request is marked as Work in Progress. DO NOT MERGE!“) if github.pr_title.include? “[WIP]”