fbe 0.29.1 → 0.30.0
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 +4 -4
- data/.github/workflows/typos.yml +1 -1
- data/Gemfile.lock +4 -4
- data/lib/fbe/unmask_repos.rb +11 -2
- data/lib/fbe.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28d22ca3024f7acbd6630b903aeaaf5391e2debb3cd7dbab920c664473f1567
|
4
|
+
data.tar.gz: 955bd9e464b2450eeeee67c9cbcc222687c00a1bb6bc5d9b5e37539d7b43700b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87935f90c30759d39a960e0c44c717bf7cd6080114aa538546b3970efdec95449a3e749fbe6b575cf064cbd536f133a694d1ba11a9e608cf6fc43c058ec85867
|
7
|
+
data.tar.gz: e1b306dfdb743aac0efaaa41fbaa73aeb327cdeae33a254046211eb98608c876e7ae351800dde5ff72a74741774985cad53c264a51d24d8cfa12cb570d044189
|
data/.github/workflows/typos.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -63,7 +63,7 @@ GEM
|
|
63
63
|
bigdecimal (3.2.2)
|
64
64
|
builder (3.3.0)
|
65
65
|
concurrent-ruby (1.3.5)
|
66
|
-
connection_pool (2.5.
|
66
|
+
connection_pool (2.5.4)
|
67
67
|
crack (1.0.0)
|
68
68
|
bigdecimal
|
69
69
|
rexml
|
@@ -76,7 +76,7 @@ GEM
|
|
76
76
|
ellipsized (0.3.0)
|
77
77
|
ethon (0.15.0)
|
78
78
|
ffi (>= 1.15.0)
|
79
|
-
factbase (0.15.
|
79
|
+
factbase (0.15.7)
|
80
80
|
backtrace (~> 0.4)
|
81
81
|
decoor (~> 0.1)
|
82
82
|
ellipsized (~> 0.3)
|
@@ -121,7 +121,7 @@ GEM
|
|
121
121
|
iri (0.11.2)
|
122
122
|
joined (0.4.0)
|
123
123
|
json (2.13.2)
|
124
|
-
judges (0.53.
|
124
|
+
judges (0.53.6)
|
125
125
|
backtrace (~> 0.4)
|
126
126
|
baza.rb (~> 0.5)
|
127
127
|
concurrent-ruby (~> 1.2)
|
@@ -203,7 +203,7 @@ GEM
|
|
203
203
|
rubocop-ast (1.46.0)
|
204
204
|
parser (>= 3.3.7.2)
|
205
205
|
prism (~> 1.4)
|
206
|
-
rubocop-minitest (0.38.
|
206
|
+
rubocop-minitest (0.38.2)
|
207
207
|
lint_roller (~> 1.1)
|
208
208
|
rubocop (>= 1.75.0, < 2.0)
|
209
209
|
rubocop-ast (>= 1.38.0, < 2.0)
|
data/lib/fbe/unmask_repos.rb
CHANGED
@@ -49,12 +49,17 @@ end
|
|
49
49
|
# @param [Judges::Options] options Options containing 'repositories' field with masks
|
50
50
|
# @param [Hash] global Global cache for storing API responses
|
51
51
|
# @param [Loog] loog Logger for debug output
|
52
|
+
# @param [Time] start When did we start the entire pipeline
|
52
53
|
# @param [quota_aware] Boolean Should we stop if quota is off?
|
54
|
+
# @param [lifetime_aware] Boolean Should we stop if lifetime is over?
|
53
55
|
# @return [Array<String>] Shuffled list of repository full names (e.g., 'org/repo')
|
54
56
|
# @raise [RuntimeError] If no repositories match the provided masks
|
55
57
|
# @note Exclusion patterns must start with '-' (e.g., '-org/pattern*')
|
56
58
|
# @note Results are shuffled to distribute load when processing
|
57
|
-
def Fbe.unmask_repos(
|
59
|
+
def Fbe.unmask_repos(
|
60
|
+
options: $options, global: $global, loog: $loog, start: $start,
|
61
|
+
quota_aware: true, lifetime_aware: true
|
62
|
+
)
|
58
63
|
raise 'Repositories mask is not specified' unless options.repositories
|
59
64
|
raise 'Repositories mask is empty' if options.repositories.empty?
|
60
65
|
repos = []
|
@@ -82,7 +87,11 @@ def Fbe.unmask_repos(options: $options, global: $global, loog: $loog, quota_awar
|
|
82
87
|
return repos unless block_given?
|
83
88
|
repos.each do |repo|
|
84
89
|
if quota_aware && octo.off_quota?
|
85
|
-
|
90
|
+
loog.info("No GitHub quota left, it is time to stop at #{repo}")
|
91
|
+
break
|
92
|
+
end
|
93
|
+
if lifetime_aware && options.lifetime && Time.now - start > options.lifetime - 10
|
94
|
+
loog.info("No time left, it is time to stop at #{repo}")
|
86
95
|
break
|
87
96
|
end
|
88
97
|
yield repo
|
data/lib/fbe.rb
CHANGED