forked from Lotos8754/My-Wallet-V3-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dangerfile
26 lines (17 loc) · 865 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
24
25
26
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if github.pr_labels == "In Progress"
failure("PR is classed as not ready to be merged") if github.pr_labels == "Don't Merge Yet"
declared_trivial = github.pr_labels == "Easy PR"
swiftlint.lint_files
swiftlint.lint_files inline_mode: true
swiftlint.lint_all_files = false
swiftformat.check_format(fail_on_error: true)
ios_ticket_referenced = github.pr_title.include? "IOS-"
if !ios_ticket_referenced
warn "All PRs should include a JIRA ticket in the title."
end
failure "Please add labels to this PR" if github.pr_labels.empty?
# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 1300