fbe 0.41.3 → 0.41.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 +4 -4
- data/.github/workflows/typos.yml +1 -1
- data/Gemfile.lock +17 -18
- data/Rakefile +1 -0
- data/lib/fbe/iterate.rb +4 -4
- data/lib/fbe/octo.rb +12 -0
- data/lib/fbe/unmask_repos.rb +5 -12
- 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: d9518a5a77a906444fd8659fdbbe6e9be948ae5d40da3c217ea8a2c7ee176c3d
|
|
4
|
+
data.tar.gz: 2e5c513b00aaf4cb7cb3a62e1627389ade43cf10c3ea56ef3807c176b321e1c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4c3615dbbeac74eebd6789d5b53b1a66c82264b528e733ae1b6bb51235b9272d2ff1e9ecb97f8d192dc300f7ca26f123da6025deb28b3d0424f61d559e0de83
|
|
7
|
+
data.tar.gz: f33440f66f32a61911684ee5ce7508c645110105fcf5c38a0c452e509d66f7e5376a2437fcc5a764546f37065cb4353a58caa883acdd525f56efa5bc0aebc390
|
data/.github/workflows/typos.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -28,14 +28,14 @@ PATH
|
|
|
28
28
|
GEM
|
|
29
29
|
remote: https://rubygems.org/
|
|
30
30
|
specs:
|
|
31
|
-
activesupport (8.
|
|
31
|
+
activesupport (8.1.1)
|
|
32
32
|
base64
|
|
33
|
-
benchmark (>= 0.3)
|
|
34
33
|
bigdecimal
|
|
35
34
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
36
35
|
connection_pool (>= 2.2.5)
|
|
37
36
|
drb
|
|
38
37
|
i18n (>= 1.6, < 2)
|
|
38
|
+
json
|
|
39
39
|
logger (>= 1.4.2)
|
|
40
40
|
minitest (>= 5.1)
|
|
41
41
|
securerandom (>= 0.3)
|
|
@@ -59,7 +59,6 @@ GEM
|
|
|
59
59
|
retries (~> 0.0)
|
|
60
60
|
tago (~> 0.2)
|
|
61
61
|
typhoeus (~> 1.4)
|
|
62
|
-
benchmark (0.4.1)
|
|
63
62
|
bigdecimal (3.3.1)
|
|
64
63
|
builder (3.3.0)
|
|
65
64
|
concurrent-ruby (1.3.5)
|
|
@@ -76,7 +75,7 @@ GEM
|
|
|
76
75
|
ellipsized (0.3.0)
|
|
77
76
|
ethon (0.15.0)
|
|
78
77
|
ffi (>= 1.15.0)
|
|
79
|
-
factbase (0.16.
|
|
78
|
+
factbase (0.16.8)
|
|
80
79
|
backtrace (~> 0.4)
|
|
81
80
|
decoor (~> 0.1)
|
|
82
81
|
ellipsized (~> 0.3)
|
|
@@ -107,7 +106,7 @@ GEM
|
|
|
107
106
|
filesize (0.2.0)
|
|
108
107
|
gli (2.22.2)
|
|
109
108
|
ostruct
|
|
110
|
-
graphql (2.5.
|
|
109
|
+
graphql (2.5.14)
|
|
111
110
|
base64
|
|
112
111
|
fiber-storage
|
|
113
112
|
logger
|
|
@@ -120,8 +119,8 @@ GEM
|
|
|
120
119
|
intercepted (0.2.0)
|
|
121
120
|
iri (0.11.2)
|
|
122
121
|
joined (0.4.0)
|
|
123
|
-
json (2.15.
|
|
124
|
-
judges (0.
|
|
122
|
+
json (2.15.2)
|
|
123
|
+
judges (0.55.0)
|
|
125
124
|
backtrace (~> 0.4)
|
|
126
125
|
baza.rb (~> 0.10)
|
|
127
126
|
concurrent-ruby (~> 1.2)
|
|
@@ -140,7 +139,7 @@ GEM
|
|
|
140
139
|
typhoeus (~> 1.3)
|
|
141
140
|
language_server-protocol (3.17.0.5)
|
|
142
141
|
lint_roller (1.1.0)
|
|
143
|
-
liquid (5.
|
|
142
|
+
liquid (5.10.0)
|
|
144
143
|
bigdecimal
|
|
145
144
|
strscan (>= 3.1.1)
|
|
146
145
|
logger (1.7.0)
|
|
@@ -155,7 +154,7 @@ GEM
|
|
|
155
154
|
minitest-stub-const (0.6)
|
|
156
155
|
moments (0.3.0)
|
|
157
156
|
multipart-post (2.4.1)
|
|
158
|
-
net-http (0.
|
|
157
|
+
net-http (0.7.0)
|
|
159
158
|
uri
|
|
160
159
|
nokogiri (1.18.10-arm64-darwin)
|
|
161
160
|
racc (~> 1.4)
|
|
@@ -173,12 +172,12 @@ GEM
|
|
|
173
172
|
ostruct (0.6.3)
|
|
174
173
|
others (0.1.1)
|
|
175
174
|
parallel (1.27.0)
|
|
176
|
-
parser (3.3.
|
|
175
|
+
parser (3.3.10.0)
|
|
177
176
|
ast (~> 2.4.1)
|
|
178
177
|
racc
|
|
179
|
-
prism (1.
|
|
178
|
+
prism (1.6.0)
|
|
180
179
|
public_suffix (6.0.2)
|
|
181
|
-
qbash (0.4.
|
|
180
|
+
qbash (0.4.7)
|
|
182
181
|
backtrace (> 0)
|
|
183
182
|
elapsed (> 0)
|
|
184
183
|
loog (> 0)
|
|
@@ -189,7 +188,7 @@ GEM
|
|
|
189
188
|
regexp_parser (2.11.3)
|
|
190
189
|
retries (0.0.5)
|
|
191
190
|
rexml (3.4.4)
|
|
192
|
-
rubocop (1.81.
|
|
191
|
+
rubocop (1.81.7)
|
|
193
192
|
json (~> 2.3)
|
|
194
193
|
language_server-protocol (~> 3.17.0.2)
|
|
195
194
|
lint_roller (~> 1.1.0)
|
|
@@ -215,7 +214,7 @@ GEM
|
|
|
215
214
|
lint_roller (~> 1.1)
|
|
216
215
|
rubocop (>= 1.72.1)
|
|
217
216
|
ruby-progressbar (1.13.0)
|
|
218
|
-
sawyer (0.9.
|
|
217
|
+
sawyer (0.9.3)
|
|
219
218
|
addressable (>= 2.3.5)
|
|
220
219
|
faraday (>= 0.17.3, < 3)
|
|
221
220
|
securerandom (0.4.1)
|
|
@@ -233,8 +232,8 @@ GEM
|
|
|
233
232
|
sqlite3 (2.7.4-x86_64-darwin)
|
|
234
233
|
sqlite3 (2.7.4-x86_64-linux-gnu)
|
|
235
234
|
strscan (3.1.5)
|
|
236
|
-
tago (0.
|
|
237
|
-
timeout (0.4.
|
|
235
|
+
tago (0.4.0)
|
|
236
|
+
timeout (0.4.4)
|
|
238
237
|
total (0.4.1)
|
|
239
238
|
typhoeus (1.5.0)
|
|
240
239
|
ethon (>= 0.9.0, < 0.16.0)
|
|
@@ -243,12 +242,12 @@ GEM
|
|
|
243
242
|
unicode-display_width (3.2.0)
|
|
244
243
|
unicode-emoji (~> 4.1)
|
|
245
244
|
unicode-emoji (4.1.0)
|
|
246
|
-
uri (1.0
|
|
245
|
+
uri (1.1.0)
|
|
247
246
|
veils (0.4.0)
|
|
248
247
|
verbose (0.1.0)
|
|
249
248
|
loog (~> 0.2)
|
|
250
249
|
tago (~> 0.0)
|
|
251
|
-
webmock (3.26.
|
|
250
|
+
webmock (3.26.1)
|
|
252
251
|
addressable (>= 2.8.0)
|
|
253
252
|
crack (>= 0.3.2)
|
|
254
253
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/Rakefile
CHANGED
data/lib/fbe/iterate.rb
CHANGED
|
@@ -243,10 +243,10 @@ class Fbe::Iterate
|
|
|
243
243
|
raise 'Use "by" first' if @query.nil?
|
|
244
244
|
seen = {}
|
|
245
245
|
oct = Fbe.octo(loog: @loog, options: @options, global: @global)
|
|
246
|
-
if
|
|
247
|
-
@
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
return if Fbe.over?(
|
|
247
|
+
global: @global, options: @options, loog: @loog, epoch: @epoch, kickoff: @kickoff,
|
|
248
|
+
quota_aware: @quota_aware, lifetime_aware: @lifetime_aware, timeout_aware: @timeout_aware
|
|
249
|
+
)
|
|
250
250
|
repos = Fbe.unmask_repos(
|
|
251
251
|
loog: @loog, options: @options, global: @global, quota_aware: @quota_aware
|
|
252
252
|
).map { |n| oct.repo_id_by_name(n) }
|
data/lib/fbe/octo.rb
CHANGED
|
@@ -693,6 +693,18 @@ class Fbe::FakeOctokit
|
|
|
693
693
|
# # => {:id=>42, :number=>42, :created_at=>...}
|
|
694
694
|
def issue(repo, number)
|
|
695
695
|
case number
|
|
696
|
+
when 94
|
|
697
|
+
{
|
|
698
|
+
id: 42,
|
|
699
|
+
number:,
|
|
700
|
+
repo: {
|
|
701
|
+
full_name: repo
|
|
702
|
+
},
|
|
703
|
+
pull_request: {
|
|
704
|
+
merged_at: nil
|
|
705
|
+
},
|
|
706
|
+
created_at: Time.parse('2024-09-20 19:00:00 UTC')
|
|
707
|
+
}
|
|
696
708
|
when 142
|
|
697
709
|
{
|
|
698
710
|
id: 655,
|
data/lib/fbe/unmask_repos.rb
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
require 'joined'
|
|
7
7
|
require_relative '../fbe'
|
|
8
8
|
require_relative 'octo'
|
|
9
|
+
require_relative 'over'
|
|
9
10
|
|
|
10
11
|
# Converts a repository mask pattern to a regular expression.
|
|
11
12
|
#
|
|
@@ -64,6 +65,9 @@ def Fbe.unmask_repos(
|
|
|
64
65
|
)
|
|
65
66
|
raise 'Repositories mask is not specified' unless options.repositories
|
|
66
67
|
raise 'Repositories mask is empty' if options.repositories.empty?
|
|
68
|
+
return if block_given? && Fbe.over?(
|
|
69
|
+
global:, options:, loog:, epoch:, kickoff:, quota_aware:, lifetime_aware:, timeout_aware:
|
|
70
|
+
)
|
|
67
71
|
repos = []
|
|
68
72
|
octo = Fbe.octo(loog:, global:, options:)
|
|
69
73
|
masks = (options.repositories || '').split(',')
|
|
@@ -88,18 +92,7 @@ def Fbe.unmask_repos(
|
|
|
88
92
|
repos.each { |repo| octo.repository(repo) }
|
|
89
93
|
return repos unless block_given?
|
|
90
94
|
repos.each do |repo|
|
|
91
|
-
if quota_aware
|
|
92
|
-
loog.info("No GitHub quota left, it is time to stop at #{repo}")
|
|
93
|
-
break
|
|
94
|
-
end
|
|
95
|
-
if lifetime_aware && options.lifetime && Time.now - epoch > options.lifetime * 0.9
|
|
96
|
-
loog.info("No time left, it is time to stop at #{repo}")
|
|
97
|
-
break
|
|
98
|
-
end
|
|
99
|
-
if timeout_aware && options.timeout && Time.now - kickoff > options.timeout * 0.9
|
|
100
|
-
loog.info("No time left, it is time to stop at #{repo}")
|
|
101
|
-
break
|
|
102
|
-
end
|
|
95
|
+
break if Fbe.over?(global:, options:, loog:, epoch:, kickoff:, quota_aware:, lifetime_aware:, timeout_aware:)
|
|
103
96
|
yield repo
|
|
104
97
|
end
|
|
105
98
|
end
|
data/lib/fbe.rb
CHANGED