thefuntasty_danger 0.4.0 → 0.8.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 +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f4aef1bc2430be38698790856dc000f9e22ec8682f9dfc06c92cf984d89f023
|
4
|
+
data.tar.gz: bd505eccaddac24140385c5dabacde9740c289b07a647aea33e4735061441611
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a4b8ee3612db2664d76f5a91ec30cc68b84107e6178e76d814f0632a3cedfeafb3dd3bd37f8cd3a2123cead19614bc59cc2e1a8e642c30c36b646a8d3480673
|
7
|
+
data.tar.gz: a9962a259dd38bef903ebcf05da3869b17cbc742b1c190cd9cb907eb04e98312533d222e0d0d2d52c6f5c159339973f3f4ae6c7865f5ff48bf1ee813354b0c6b
|
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 File.exist? xcresult_file 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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matěj Kašpar Jirásek
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-24 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
|
@@ -78,7 +78,7 @@ homepage: https://github.com/futuredapp/danger
|
|
78
78
|
licenses:
|
79
79
|
- MIT
|
80
80
|
metadata: {}
|
81
|
-
post_install_message:
|
81
|
+
post_install_message:
|
82
82
|
rdoc_options: []
|
83
83
|
require_paths:
|
84
84
|
- lib
|
@@ -93,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
97
|
-
signing_key:
|
96
|
+
rubygems_version: 3.2.22
|
97
|
+
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: The Danger rules we use at Futured
|
100
100
|
test_files: []
|