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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/Dangerfile +19 -6
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c36bdfa85dd234321b57a90270bcd3568cefd6d26a692aaa41039460ef4f7e1
4
- data.tar.gz: 39a810f7cdf540f3371d9deda8f3dcacd610c71342a06023edbf997b4324187f
3
+ metadata.gz: bbd822e0e657d2013055436b504ef203e2969b73499e49159f192753023c269a
4
+ data.tar.gz: 12ccda4e096d09f0c95032d4fd6d5b1f531338cdb627f154d40a4fecf69b17b4
5
5
  SHA512:
6
- metadata.gz: c317e2406b8fb737f41fcc534afe2c107ef7d81b632e82745b4d30fc66e3e7d5ea112b948f670555cc27a1455b00eee1f2878a4c2d6c53d10e95876cdf49d850
7
- data.tar.gz: 4917f61ad26ac86e7808ffeca1983caf28cdb673563db2d060a7574facdafb4d9f6bf3ae1c9faf12fb99f6ff3cd0c90e5f7ce4099b4ffa3c68408baa9b57d40d
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
- build_report_file = 'build/reports/errors.json'
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
- can_be_merged_to_master = github.branch_for_head.match(/^((release|hotfix)\/|develop$)/)
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
- fail("Only develop, hotfix and release can point to master.") if !can_be_merged_to_master and github.branch_for_base == "master"
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
- if File.file?(build_report_file) then
59
- xcode_summary.ignored_files = '**/Pods/**'
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 build_report_file
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.5.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: 2020-09-02 00:00:00.000000000 Z
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: '6'
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: '6'
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: '0'
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: '0'
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.0.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