thefuntasty_danger 0.5.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dangerfile +19 -6
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd822e0e657d2013055436b504ef203e2969b73499e49159f192753023c269a
|
4
|
+
data.tar.gz: 12ccda4e096d09f0c95032d4fd6d5b1f531338cdb627f154d40a4fecf69b17b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5f13bd88fef91fbccfd99252034ef4e2b4f6252e7c6d295bedeb5298fffafc96ff534b9f9d571d683286cedfcea2b8be6e4f5c20cf496896e5590ce05af5e15
|
7
|
+
data.tar.gz: 16d9449d5fc7879e6d995f80b75e5a98903219e36d1e7592a15ad0866f239ca667d7764e33a4267e763fb9e3773d2e712a75216c818b05b1a150f5c787310b3e
|
data/Dangerfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
jira_link = "https://thefuntasty.atlassian.net/browse/"
|
3
3
|
max_pr_length = 500
|
4
4
|
swiftlint_binary_path = './Pods/SwiftLint/swiftlint'
|
5
|
-
|
5
|
+
dependency_configuration_files = ['Package.swift', 'Package.resolved', 'Podfile', 'Cartfile']
|
6
6
|
|
7
7
|
# Regular expressions for PR title and branch
|
8
8
|
pr_title_pattern = /^([A-Z]{2,}-\d+)\s\w{2,}/
|
@@ -11,7 +11,7 @@ branch_name_pattern = /^(feature|hotfix|fix)\/([A-Z]{2,})-\d+-/
|
|
11
11
|
# Convenience variables
|
12
12
|
has_correct_prefix = github.branch_for_head.match(/^(feature|hotfix|fix|release|housekeep)\//)
|
13
13
|
is_feature_or_fix = github.branch_for_head.match(/^(feature|hotfix|fix)\//)
|
14
|
-
|
14
|
+
can_be_merged_to_main = github.branch_for_head.match(/^((release|hotfix)\/|develop$)/)
|
15
15
|
|
16
16
|
branch_contains_jira_id = github.branch_for_head.match(branch_name_pattern)
|
17
17
|
title_contains_jira_id = github.pr_title.match(pr_title_pattern)
|
@@ -23,7 +23,9 @@ is_pr_big = git.insertions > max_pr_length
|
|
23
23
|
github.dismiss_out_of_range_messages
|
24
24
|
|
25
25
|
# Throw errors
|
26
|
-
|
26
|
+
if !can_be_merged_to_main and ["main", "master"].include? github.branch_for_base then
|
27
|
+
fail("Only develop, hotfix and release can point to main.")
|
28
|
+
end
|
27
29
|
|
28
30
|
# Throw descriptive warnings
|
29
31
|
warn("Branch name should have `release/`, `hotfix/`, `fix/`, `housekeep/` or `feature/` prefix.") if !has_correct_prefix
|
@@ -55,8 +57,19 @@ if `gem list -i danger-swiftlint`.strip == "true" then
|
|
55
57
|
end
|
56
58
|
|
57
59
|
# Send iOS build results if possible
|
58
|
-
|
59
|
-
|
60
|
+
xcresult_file = Dir["fastlane/test_output/*.xcresult"].first
|
61
|
+
if !xcresult_file.nil? then
|
62
|
+
xcode_summary.ignored_files = 'Pods/**'
|
60
63
|
xcode_summary.inline_mode = true
|
61
|
-
xcode_summary.report
|
64
|
+
xcode_summary.report xcresult_file
|
65
|
+
end
|
66
|
+
|
67
|
+
# Warn about documenting dependency changes
|
68
|
+
modified_dependencies = git.modified_files.any? { |path|
|
69
|
+
dependency_configuration_files.any? { |config|
|
70
|
+
path.end_with? config
|
71
|
+
}
|
72
|
+
}
|
73
|
+
if !git.modified_files.include?("README.md") and modified_dependencies then
|
74
|
+
warn("README.md should be updated when dependencies are changed.")
|
62
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thefuntasty_danger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matěj Kašpar Jirásek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: danger-commit_lint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: danger-swiftlint
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.2.22
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: The Danger rules we use at Futured
|