hiiro 0.1.294 → 0.1.295
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/CHANGELOG.md +5 -1
- data/lib/hiiro/pinned_pr_manager.rb +17 -1
- data/lib/hiiro/version.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: 11e1f44deb6626f97123e066d0c746e82174392c5c60b28a508f4730b62a85f7
|
|
4
|
+
data.tar.gz: b72bf798fe7e23b2e1df95746f6f3c07482fd19f620f9114bc356dc4226c3d92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '06915243bcc868b2ea77def9c9ead108409dd85a3fe6a1a3ca2fbdbfb1b421bb3c5e86ef58ec2535b0e4878f5c8384e8d3b13f04f533f577403a9c3d8181741d'
|
|
7
|
+
data.tar.gz: 4d75730e12195c1945af43b348932a0fcd0ae5b4cc7d7da6f1f2b8b4b1c5f6bbc8176523d9919ebbd7f044bf77f6922477d03d396550a8820a3344cd8763f10a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
1
|
```markdown
|
|
2
|
+
## v0.1.295 (2026-03-26)
|
|
3
|
+
|
|
4
|
+
### Changed
|
|
5
|
+
- `h pr ls`/`h pr update`: filter flags now use AND-across-dimensions logic — state flags (`-o`, `-m`, `-D`, `-c`) OR within their group, check flags (`-r`, `-g`, `-p`) OR within theirs, and the two groups AND together; e.g. `-o -g` shows open PRs with passing checks, `-o -r -g` shows open PRs with failing or passing checks
|
|
6
|
+
|
|
3
7
|
## v0.1.294 (2026-03-26)
|
|
4
8
|
|
|
5
9
|
### Fixed
|
|
@@ -15,6 +15,15 @@ class Hiiro
|
|
|
15
15
|
active: ->(pr) { !pr.merged? && !pr.closed? },
|
|
16
16
|
}.freeze
|
|
17
17
|
|
|
18
|
+
# Filters are split into two orthogonal dimensions:
|
|
19
|
+
# state — what lifecycle state the PR is in (active, merged, draft, conflicting)
|
|
20
|
+
# checks — what the CI check status is (red, green, pending)
|
|
21
|
+
# Flags within each dimension OR together; dimensions AND together.
|
|
22
|
+
# e.g. -o -g → (active) AND (green checks)
|
|
23
|
+
# -o -r -g → (active) AND (red OR green)
|
|
24
|
+
STATE_FILTER_KEYS = %i[active merged drafts conflicts].freeze
|
|
25
|
+
CHECK_FILTER_KEYS = %i[red green pending].freeze
|
|
26
|
+
|
|
18
27
|
def self.add_resolvers(hiiro)
|
|
19
28
|
pm = new
|
|
20
29
|
hiiro.add_resolver(:pr,
|
|
@@ -392,7 +401,14 @@ class Hiiro
|
|
|
392
401
|
active = FILTER_PREDICATES.keys.select { |f| opts.respond_to?(f) && opts.send(f) }
|
|
393
402
|
active = (active + forced).uniq
|
|
394
403
|
|
|
395
|
-
|
|
404
|
+
state_flags = active & STATE_FILTER_KEYS
|
|
405
|
+
check_flags = active & CHECK_FILTER_KEYS
|
|
406
|
+
|
|
407
|
+
results = prs.select do |pr|
|
|
408
|
+
state_match = state_flags.empty? || state_flags.any? { |f| FILTER_PREDICATES[f]&.call(pr) }
|
|
409
|
+
check_match = check_flags.empty? || check_flags.any? { |f| FILTER_PREDICATES[f]&.call(pr) }
|
|
410
|
+
state_match && check_match
|
|
411
|
+
end
|
|
396
412
|
|
|
397
413
|
# Tags are an AND post-filter; multiple tags are OR'd among themselves
|
|
398
414
|
tag_filter = Array(opts.respond_to?(:tag) ? opts.tag : nil).map(&:to_s).reject(&:empty?)
|
data/lib/hiiro/version.rb
CHANGED