fbe 0.41.6 → 0.42.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/actionlint.yml +1 -1
- data/.github/workflows/codecov.yml +1 -1
- data/.github/workflows/copyrights.yml +1 -1
- data/.github/workflows/markdown-lint.yml +1 -1
- data/.github/workflows/pdd.yml +1 -1
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/reuse.yml +1 -1
- data/.github/workflows/typos.yml +1 -1
- data/.github/workflows/xcop.yml +1 -1
- data/.github/workflows/yamllint.yml +1 -1
- data/lib/fbe/tombstone.rb +28 -3
- 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: e20ce6012a663c91fa76f4e332db9fcca0df0a00b5fae7ef53bb559653b8657d
|
|
4
|
+
data.tar.gz: 76daff2e00b453611de5591b622b36e1ca16aaea86fd80966df27eec9738a187
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 535591e915b299f2ccd78d85e2a4f3876b539e9d6c39ac45e2da0e326cfc3309c13b84706567f94d2714b103da66abba634a90f155d42c8f68a4fe64b8417b3f
|
|
7
|
+
data.tar.gz: a36a7ee9b7349deb85d05245cc2ade4366d429ea450e3180926a9d092e6a5087898038d4b37866c8d80c4ca1939186fac67b1f1fc26a996d18946f60eabdfe74
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
timeout-minutes: 15
|
|
16
16
|
runs-on: ubuntu-24.04
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
19
|
- name: Download actionlint
|
|
20
20
|
id: get_actionlint
|
|
21
21
|
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
data/.github/workflows/pdd.yml
CHANGED
data/.github/workflows/rake.yml
CHANGED
data/.github/workflows/reuse.yml
CHANGED
data/.github/workflows/typos.yml
CHANGED
data/.github/workflows/xcop.yml
CHANGED
data/lib/fbe/tombstone.rb
CHANGED
|
@@ -22,11 +22,32 @@ class Fbe::Tombstone
|
|
|
22
22
|
@fid = fid
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# See all issues in the tombstone, as array of numbers.
|
|
26
|
+
# @param [String] where The place, e.g. "github"
|
|
27
|
+
# @param [Integer] repo ID of repository
|
|
28
|
+
# @return [Array<Integer>] IDs of issue
|
|
29
|
+
def issues(where, repo)
|
|
30
|
+
raise 'The type of "where" is not String' unless where.is_a?(String)
|
|
31
|
+
raise 'The type of "repo" is not Integer' unless repo.is_a?(Integer)
|
|
32
|
+
f = @fb.query(
|
|
33
|
+
"(and (eq where '#{where}') (eq what 'tombstone') (eq repository #{repo}) (exists issues))"
|
|
34
|
+
).each.first
|
|
35
|
+
return [] if f.nil?
|
|
36
|
+
f['issues'].map do |ii|
|
|
37
|
+
a, b = ii.split('-').map(&:to_i)
|
|
38
|
+
b = a if b.nil?
|
|
39
|
+
(a..b).map { |i| i }
|
|
40
|
+
end.flatten
|
|
41
|
+
end
|
|
42
|
+
|
|
25
43
|
# Put it there.
|
|
26
44
|
# @param [String] where The place, e.g. "github"
|
|
27
45
|
# @param [Integer] repo ID of repository
|
|
28
|
-
# @param [Integer] issue ID of issue (or array of them)
|
|
46
|
+
# @param [Integer, Array<Integer>] issue ID of issue (or array of them)
|
|
29
47
|
def bury!(where, repo, issue)
|
|
48
|
+
raise 'The type of "where" is not String' unless where.is_a?(String)
|
|
49
|
+
raise 'The type of "repo" is not Integer' unless repo.is_a?(Integer)
|
|
50
|
+
raise 'The type of "issue" is neither Integer nor Array' unless issue.is_a?(Integer) || issue.is_a?(Array)
|
|
30
51
|
f =
|
|
31
52
|
Fbe.if_absent(fb: @fb, always: true) do |n|
|
|
32
53
|
n.what = 'tombstone'
|
|
@@ -48,16 +69,20 @@ class Fbe::Tombstone
|
|
|
48
69
|
end
|
|
49
70
|
end
|
|
50
71
|
Fbe.overwrite(
|
|
51
|
-
f, 'issues', merged.map { |ii| ii[0] == ii[1] ? ii[0].to_s : "#{ii[0]}-#{ii[1]}" },
|
|
72
|
+
f, 'issues', merged.map { |ii| ii[0] == ii[1] ? ii[0].to_s : "#{ii[0]}-#{ii[1]}" },
|
|
73
|
+
fb: @fb, fid: @fid
|
|
52
74
|
)
|
|
53
75
|
end
|
|
54
76
|
|
|
55
77
|
# Is it there?
|
|
56
78
|
# @param [String] where The place, e.g. "github"
|
|
57
79
|
# @param [Integer] repo ID of repository
|
|
58
|
-
# @param [Integer] issue ID of issue (or array of them)
|
|
80
|
+
# @param [Integer, Array<Integer>] issue ID of issue (or array of them)
|
|
59
81
|
# @return [Boolean] True if it's there
|
|
60
82
|
def has?(where, repo, issue)
|
|
83
|
+
raise 'The type of "where" is not String' unless where.is_a?(String)
|
|
84
|
+
raise 'The type of "repo" is not Integer' unless repo.is_a?(Integer)
|
|
85
|
+
raise 'The type of "issue" is neither Integer nor Array' unless issue.is_a?(Integer) || issue.is_a?(Array)
|
|
61
86
|
f = @fb.query(
|
|
62
87
|
"(and (eq where '#{where}') (eq what 'tombstone') (eq repository #{repo}) (exists issues))"
|
|
63
88
|
).each.first
|
data/lib/fbe.rb
CHANGED