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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ca86bd25276511b4190cdde354a65a71243a2fad0b94604e10ac14d466d8c33
4
- data.tar.gz: 9cb9807c855963e1b5c260f9be734c7b3032a1cca941bed1432e40e06d144f33
3
+ metadata.gz: 11e1f44deb6626f97123e066d0c746e82174392c5c60b28a508f4730b62a85f7
4
+ data.tar.gz: b72bf798fe7e23b2e1df95746f6f3c07482fd19f620f9114bc356dc4226c3d92
5
5
  SHA512:
6
- metadata.gz: d3d792f804941b33782102e92a81e8a12abdafcfd01182db74a98b9e2553b4286a4cb135a4da44b81e7cd707af38429c7b976d84d86768c02be0ed0f3b7d3dd6
7
- data.tar.gz: a4147e91c73d2aed9cd89868d5830eca7b2db4d5361e74062df995b9cd5d4d692276c075abadb3beaf5a8ac69f9ba696043cd7600ffa27d3505d8e1ef062c845
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
- results = active.empty? ? prs : prs.select { |pr| active.any? { |f| FILTER_PREDICATES[f]&.call(pr) } }
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
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.294"
2
+ VERSION = "0.1.295"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.294
4
+ version: 0.1.295
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota