hiiro 0.1.345 → 0.1.347

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/bin/h-pr +24 -3
  4. data/lib/hiiro/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e46cf30e0170d883a3b5dcf6e74e6cd922b344c71f58dd45d0b7d2ec05eefa41
4
- data.tar.gz: 05db55a107104823401ce9b3a07a2437943d8250a5bdced2d0bfaa87c53cbd15
3
+ metadata.gz: d531f00467c20b27b2842925a0f03b6a004fa23418353f78e582c4825c401ac8
4
+ data.tar.gz: 6ca47f84c177f5f7e3a0a9897015a4d5d8b6c099975b77985bacee9c6fcf9b1a
5
5
  SHA512:
6
- metadata.gz: 576c57204f0e860d74068168bc8483af0a495e1afe7d562bb482142ea1af190c13c3958712978ffa1d0e36a5fdacca4c3bec201c9adbacec4918ba46679de2cd
7
- data.tar.gz: 97a7acaf188780eef1ad9ca522e43111c19fde4ea17f1738fc7d54465617433a887c0b73b1390f481cd1606d41f9cac6c58dd42444afd56c66730206bd99fb00
6
+ metadata.gz: c83b9628190944ef4f4d0a5a3c75c50b11d5de1ffec93958d2781832528995fde443e516dfb47f5902b7546c28f68da3ff85d8ea95dddc283cf986931698bb96
7
+ data.tar.gz: 851e36d0499ccaabd36c363b17d19816c66954d73e4f9ccaeac9b345cd5a55a6a86592c9c8f9318f9775c580488b81169fdc0919fe74819f02e3b383d35ba83e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.347] - 2026-04-12
4
+
5
+ ### Added
6
+ - `h pr tags` now supports flags: `--update/-u` (refresh PR status before listing), `--verbose/-v` (multi-line output per PR), `--checks/-C` (show individual check run details)
7
+
8
+ ## [0.1.346] - 2026-04-12
9
+
10
+ ### Added
11
+ - `h pr tags` now accepts optional tag names to filter output to only those tags
12
+
3
13
  ## [0.1.345] - 2026-04-12
4
14
 
5
15
  ### Fixed
data/bin/h-pr CHANGED
@@ -1054,7 +1054,14 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1054
1054
  pinned_manager.save_pinned(pinned)
1055
1055
  end
1056
1056
 
1057
- add_subcmd(:tags) do
1057
+ add_subcmd(:tags) do |*raw_args|
1058
+ opts = Hiiro::Options.parse(raw_args) { |o|
1059
+ o.flag(:update, short: 'u', desc: 'update status before listing')
1060
+ o.flag(:verbose, short: 'v', desc: 'multi-line output per PR')
1061
+ o.flag(:checks, short: 'C', desc: 'show individual check run details')
1062
+ }
1063
+ filter_tags = opts.args
1064
+
1058
1065
  pinned = pinned_manager.load_pinned
1059
1066
 
1060
1067
  if pinned.empty?
@@ -1062,6 +1069,9 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1062
1069
  next
1063
1070
  end
1064
1071
 
1072
+ pinned_manager.refresh_all_status(pinned, force: opts.update)
1073
+ pinned_manager.save_pinned(pinned)
1074
+
1065
1075
  by_tag = Hash.new { |h, k| h[k] = [] }
1066
1076
  untagged = []
1067
1077
 
@@ -1074,6 +1084,16 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1074
1084
  end
1075
1085
  end
1076
1086
 
1087
+ if filter_tags.any?
1088
+ unknown = filter_tags - by_tag.keys
1089
+ unknown.each { |t| STDERR.puts "No PRs tagged '#{t}'" }
1090
+ by_tag = by_tag.select { |tag, _| filter_tags.include?(tag) }
1091
+ if by_tag.empty?
1092
+ puts "No PRs match tag(s): #{filter_tags.join(', ')}"
1093
+ next
1094
+ end
1095
+ end
1096
+
1077
1097
  render_group = lambda do |label, prs, current_tag|
1078
1098
  puts label
1079
1099
  slot_w = prs.map { |pr| (pr.slot || 1).to_s.length }.max
@@ -1083,12 +1103,13 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1083
1103
  crs_w = prs.map { |pr| [pr.reviews&.dig('changes_requested').to_i.to_s.length, 1].max }.max
1084
1104
  widths = { slot: slot_w, succ: succ_w, total: total_w, as: as_w, crs: crs_w }
1085
1105
  prs.each_with_index do |pr, idx|
1086
- line = pinned_manager.display_pinned(pr, idx, widths: widths, oneline: true)
1106
+ line = pinned_manager.display_pinned(pr, idx, widths: widths, oneline: !opts.verbose)
1087
1107
  if current_tag
1088
1108
  other = Array(pr.tags) - [current_tag]
1089
1109
  line += " " + other.map { |t| "\e[30;104m#{t}\e[0m" }.join(' ') if other.any?
1090
1110
  end
1091
1111
  puts " #{line}"
1112
+ pinned_manager.display_check_runs(pr) if opts.checks
1092
1113
  end
1093
1114
  end
1094
1115
 
@@ -1096,7 +1117,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1096
1117
  render_group.call("\e[30;104m#{tag}\e[0m (#{prs.length})", prs, tag)
1097
1118
  end
1098
1119
 
1099
- render_group.call("(untagged) (#{untagged.length})", untagged, nil) if untagged.any?
1120
+ render_group.call("(untagged) (#{untagged.length})", untagged, nil) if untagged.any? && filter_tags.empty?
1100
1121
  end
1101
1122
 
1102
1123
  # === Multi-PR action commands (mCMD) ===
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.345"
2
+ VERSION = "0.1.347"
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.345
4
+ version: 0.1.347
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota