fbe 0.0.34 → 0.0.35
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/lib/fbe/octo.rb +44 -13
- data/lib/fbe.rb +1 -1
- data/test/fbe/test_octo.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da39ba8923cf39a674a0d5d6b465354eec2dc918780a266c67aad40848a78780
|
|
4
|
+
data.tar.gz: e4a3182596fa8268796cd29a7aaeadc60b188d96cb8b9b79388a0b0bdee3dd67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f901025cd88965a8b5a344a50ee7c44d92693c53104c125f8c540c64b49878d36866e07b4555c277958868db69cabc0a3ef0e9dd27634dcceae72b6b339402e
|
|
7
|
+
data.tar.gz: 06ed471547fcdec3c0fe2a09e5f268b67b7859a3a5edd91723da378ce758f01a08d4cb53dec82e4309069fb0b43618d945665afe5422228d6284b197206de87c
|
data/lib/fbe/octo.rb
CHANGED
|
@@ -301,19 +301,50 @@ class Fbe::FakeOctokit
|
|
|
301
301
|
}
|
|
302
302
|
end
|
|
303
303
|
|
|
304
|
-
def search_issues(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
304
|
+
def search_issues(query, _options = {})
|
|
305
|
+
if query.include?('type:pr') && query.include?('is:unmerged')
|
|
306
|
+
{
|
|
307
|
+
total_count: 1,
|
|
308
|
+
incomplete_results: false,
|
|
309
|
+
items: [
|
|
310
|
+
{
|
|
311
|
+
id: 42,
|
|
312
|
+
number: 10,
|
|
313
|
+
title: 'Awesome PR 10'
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
elsif query.include?('type:pr')
|
|
318
|
+
{
|
|
319
|
+
total_count: 2,
|
|
320
|
+
incomplete_results: false,
|
|
321
|
+
items: [
|
|
322
|
+
{
|
|
323
|
+
id: 42,
|
|
324
|
+
number: 10,
|
|
325
|
+
title: 'Awesome PR 10'
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: 43,
|
|
329
|
+
number: 11,
|
|
330
|
+
title: 'Awesome PR 11'
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
else
|
|
335
|
+
{
|
|
336
|
+
items: [
|
|
337
|
+
{
|
|
338
|
+
number: 42,
|
|
339
|
+
labels: [
|
|
340
|
+
{
|
|
341
|
+
name: 'bug'
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
end
|
|
317
348
|
end
|
|
318
349
|
|
|
319
350
|
def commits_since(repo, _since)
|
data/lib/fbe.rb
CHANGED
data/test/fbe/test_octo.rb
CHANGED
|
@@ -118,6 +118,18 @@ class TestOcto < Minitest::Test
|
|
|
118
118
|
assert_equal(0, o.commit_pulls('zerocracy/fbe', '16b3ea6b71c6e932ba7666c40ca846ecaa6d6f0d').size)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
+
def test_search_issues
|
|
122
|
+
WebMock.disable_net_connect!
|
|
123
|
+
o = Fbe.octo(loog: Loog::NULL, global: {}, options: Judges::Options.new({ 'testing' => true }))
|
|
124
|
+
assert_equal(42, o.search_issues('repo:zerocracy/fbe type:issue').dig(:items, 0, :number))
|
|
125
|
+
total_pr_count = 2
|
|
126
|
+
assert_equal(total_pr_count, o.search_issues('repo:zerocracy/fbe type:pr')[:total_count])
|
|
127
|
+
assert_equal(total_pr_count, o.search_issues('repo:zerocracy/fbe type:pr')[:items].count)
|
|
128
|
+
unmereged_pr_count = 1
|
|
129
|
+
assert_equal(unmereged_pr_count, o.search_issues('repo:zerocracy/fbe type:pr is:unmerged')[:total_count])
|
|
130
|
+
assert_equal(unmereged_pr_count, o.search_issues('repo:zerocracy/fbe type:pr is:unmerged')[:items].count)
|
|
131
|
+
end
|
|
132
|
+
|
|
121
133
|
def test_pauses_when_quota_is_exceeded
|
|
122
134
|
WebMock.disable_net_connect!
|
|
123
135
|
global = {}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fbe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-07-
|
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: backtrace
|