fastlane-plugin-stream_actions 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 588bc089b57e2d637ed87e062d4f70b47b9ed434a902331ade91e775b97c251d
|
|
4
|
+
data.tar.gz: '09dd367927a51c2976dc9e2bc2a52827b78ff26b9c6e37bacb6bbd66d1ffc23b'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d125f60bb7937c1825928b57c77b02eb49fae737636792b252fb257e882817be3b978003ef2d9aea4b4a0a8c7b57c2062b0b1f94a76bb75c103c0cc0b6a3f60a
|
|
7
|
+
data.tar.gz: 07e0d6184d4e3b363fbb0f4cabbff98dd681e96a96b89f7184f2b5bf5cd9d4a746a0eba382181c1866aa4443f55e3bf3c4cafa01aef3d0df3c3bf90e4251444a
|
|
@@ -25,8 +25,8 @@ module Fastlane
|
|
|
25
25
|
return false
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
# The current push does not touch :sources. It is only safe to skip if
|
|
29
|
-
#
|
|
28
|
+
# The current push does not touch :sources. It is only safe to skip if :sources were already
|
|
29
|
+
# verified, i.e. all required checks passed on some commit that has the current :sources tree.
|
|
30
30
|
is_check_required = self.required_due_to_history(params, required_checks)
|
|
31
31
|
UI.important("Check is required: #{is_check_required}")
|
|
32
32
|
is_check_required
|
|
@@ -36,8 +36,9 @@ module Fastlane
|
|
|
36
36
|
files.any? { |path| sources.any? { |required| path.start_with?(required) } }
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
# Walks the PR commits from newest to oldest
|
|
40
|
-
#
|
|
39
|
+
# Walks the PR commits from newest to oldest. Every commit newer than the last :sources change
|
|
40
|
+
# has the current :sources tree, so a passing run on any of them means :sources were verified.
|
|
41
|
+
# The walk stops at the commit that changed :sources, since older commits have different sources.
|
|
41
42
|
def self.required_due_to_history(params, required_checks)
|
|
42
43
|
repo = (params[:github_repository] || ENV['GITHUB_REPOSITORY']).to_s
|
|
43
44
|
if repo.empty?
|
|
@@ -51,20 +52,21 @@ module Fastlane
|
|
|
51
52
|
return true
|
|
52
53
|
end
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
shas.each do |sha|
|
|
56
|
+
short = sha[0, 7]
|
|
57
|
+
if self.required_checks_passed?(repo, sha, required_checks)
|
|
58
|
+
UI.message("Commit #{short} passed required checks for the current sources; safe to skip")
|
|
59
|
+
return false
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
next unless self.touches_sources?(self.commit_files(repo, sha), params[:sources])
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
UI.message("Last sources commit #{short} passed required checks; safe to skip")
|
|
63
|
-
false
|
|
64
|
-
else
|
|
65
|
-
UI.important("Last sources commit #{short} did not pass required checks; running check")
|
|
66
|
-
true
|
|
64
|
+
UI.important("Last sources commit #{short} was not verified by a passing run; running check")
|
|
65
|
+
return true
|
|
67
66
|
end
|
|
67
|
+
|
|
68
|
+
UI.message("No commit in this PR changed sources; nothing to test")
|
|
69
|
+
false
|
|
68
70
|
end
|
|
69
71
|
|
|
70
72
|
# PR commits, newest first (gh returns them oldest first).
|