hiiro 0.1.252 → 0.1.253

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 +26 -1
  3. data/bin/h-pr +79 -18
  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: b727d51b49863c23d01b1230c420149bf0266b050caf73b17b8e7914c0db01f6
4
- data.tar.gz: 6dac86e2dd81358b9b2cf78bd0021e6ce8429d1c91553cb201092712c1cf35cb
3
+ metadata.gz: 297913b8f3f54c30cc40e2210fbb8753bee6763100d7c6d4f68b2bd9b0a66975
4
+ data.tar.gz: e7b9a9c985175b6b4aaacf9ebdc008369f187a2840dd940fedb62c4aa5d3484e
5
5
  SHA512:
6
- metadata.gz: a9e10b9fd6f8056ce061028c6f60f0727885f8ecfb33ceded5bf31a5aea30584fa1333974d00f2a4a64e39cdb7f21859fe00ec16476f582245556f3c08f303fb
7
- data.tar.gz: f1253163887e6ac44e65b7e95cb4cb4ad76e0124402030f68ef326a62ca71e5c2d93fa59b928a8ef13d7444bfe84bb04d987ab28357269b2e5d70b16bd36cd33
6
+ metadata.gz: 8c4f536fd4ff55ef5ecb9c4a9672617be7642235eec2e67d23f88649fc6032ae38d5d882db85bc40fda1993037b54175f37a97f5bed6f059cc9b4473b635fd15
7
+ data.tar.gz: bb0534d40a20abd5666791f82c81ecc78a613a8ecac7eded61271be68e2b89a0466f9cf82c1a60d535be73c8b0c9d82ce3edd0a5ae075aa4fa9f1dd983c95b38
data/CHANGELOG.md CHANGED
@@ -1 +1,26 @@
1
- Done. I've created a new v0.1.252 section at the top of CHANGELOG.md dated 2026-03-14, consolidating the recent commits into concise Added and Changed sections. The previous Unreleased section remains below for ongoing development work.
1
+ ## [0.1.253] - 2026-03-15
2
+
3
+ ### Changed
4
+ - Replace CLI filters with interactive YAML editor in mmerge and mcomment for improved UX
5
+
6
+ ## [0.1.252] - 2026-03-14
7
+
8
+ ### Added
9
+ - Persistent per-task tmux color themes
10
+ - Wire task_colors into tasks.rb and hiiro.rb
11
+
12
+ ### Changed
13
+ - Task runners now receive subcmd prepended to args
14
+
15
+ ## [0.1.251] - 2026-02-15
16
+
17
+ ### Added
18
+ - `run_child` method for cleaner nested Hiiro dispatch
19
+ - Terminal tab title renaming on tmux session switch
20
+
21
+ ### Changed
22
+ - Improved publish script with Claude-based commit planning
23
+
24
+ ## [0.1.250] and earlier
25
+
26
+ See git history for detailed changes.
data/bin/h-pr CHANGED
@@ -1569,20 +1569,52 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1569
1569
  end
1570
1570
 
1571
1571
  add_subcmd(:mmerge) do |*args|
1572
- opts = Hiiro::Options.parse(args) {
1573
- instance_eval(&FILTER_OPTS)
1574
- option(:strategy, short: 's', desc: 'merge strategy (merge, squash, rebase)')
1575
- }
1576
1572
  pinned = pinned_manager.load_pinned
1577
1573
  next puts "No tracked PRs" if pinned.empty?
1578
1574
 
1579
- prs = resolve_multi.call(pinned, opts)
1580
- next unless prs
1575
+ pr_lines = pinned.map do |pr|
1576
+ branch = pr['headRefName'] ? "[#{pr['headRefName']}]" : "[##{pr['number']}]"
1577
+ "- #{pr['number']} # #{branch} #{pr['title']}"
1578
+ end
1581
1579
 
1582
- merge_args = opts.strategy ? ["--#{opts.strategy}"] : []
1583
- prs.each do |pr|
1584
- puts "Merging ##{pr['number']}: #{pr['title']}"
1585
- system('gh', 'pr', 'merge', pr['number'].to_s, *merge_args)
1580
+ yaml_content = <<~YAML
1581
+ # Select PRs to merge (remove lines you don't want).
1582
+ # strategy: merge, squash, or rebase (leave blank for GitHub default)
1583
+
1584
+ prs:
1585
+ #{pr_lines.join("\n")}
1586
+
1587
+ strategy:
1588
+ YAML
1589
+
1590
+ tmpfile = Tempfile.new(['pr-mmerge-', '.yml'])
1591
+ tmpfile.write(yaml_content)
1592
+ tmpfile.close
1593
+ edit_files(tmpfile.path)
1594
+
1595
+ parsed = YAML.safe_load(File.read(tmpfile.path)) rescue nil
1596
+ tmpfile.unlink
1597
+
1598
+ unless parsed.is_a?(Hash)
1599
+ puts "Aborted: could not parse YAML"
1600
+ next
1601
+ end
1602
+
1603
+ selected_numbers = Array(parsed['prs']).map(&:to_s).reject(&:empty?)
1604
+
1605
+ if selected_numbers.empty?
1606
+ puts "Aborted: no PRs selected"
1607
+ next
1608
+ end
1609
+
1610
+ strategy = parsed['strategy'].to_s.strip
1611
+ merge_args = strategy.empty? ? [] : ["--#{strategy}"]
1612
+
1613
+ selected_numbers.each do |num|
1614
+ pr = pinned.find { |p| p['number'].to_s == num }
1615
+ title = pr ? pr['title'] : num
1616
+ puts "Merging ##{num}: #{title}"
1617
+ system('gh', 'pr', 'merge', num, *merge_args)
1586
1618
  end
1587
1619
  end
1588
1620
 
@@ -1629,27 +1661,56 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
1629
1661
  end
1630
1662
 
1631
1663
  add_subcmd(:mcomment) do |*args|
1632
- opts = Hiiro::Options.parse(args, &FILTER_OPTS)
1633
1664
  pinned = pinned_manager.load_pinned
1634
1665
  next puts "No tracked PRs" if pinned.empty?
1635
1666
 
1636
- prs = resolve_multi.call(pinned, opts)
1637
- next unless prs
1667
+ pr_lines = pinned.map do |pr|
1668
+ branch = pr['headRefName'] ? "[#{pr['headRefName']}]" : "[##{pr['number']}]"
1669
+ "- #{pr['number']} # #{branch} #{pr['title']}"
1670
+ end
1638
1671
 
1639
- tmpfile = Tempfile.new(['pr-comment-', '.md'])
1672
+ yaml_content = <<~YAML
1673
+ # Select PRs to comment on (remove lines you don't want).
1674
+ # Write your comment in the 'comment' field below.
1675
+
1676
+ prs:
1677
+ #{pr_lines.join("\n")}
1678
+
1679
+ comment: |
1680
+
1681
+ YAML
1682
+
1683
+ tmpfile = Tempfile.new(['pr-mcomment-', '.yml'])
1684
+ tmpfile.write(yaml_content)
1640
1685
  tmpfile.close
1641
1686
  edit_files(tmpfile.path)
1642
- body = File.read(tmpfile.path).strip
1687
+
1688
+ parsed = YAML.safe_load(File.read(tmpfile.path)) rescue nil
1643
1689
  tmpfile.unlink
1644
1690
 
1691
+ unless parsed.is_a?(Hash)
1692
+ puts "Aborted: could not parse YAML"
1693
+ next
1694
+ end
1695
+
1696
+ selected_numbers = Array(parsed['prs']).map(&:to_s).reject(&:empty?)
1697
+ body = parsed['comment'].to_s.strip
1698
+
1699
+ if selected_numbers.empty?
1700
+ puts "Aborted: no PRs selected"
1701
+ next
1702
+ end
1703
+
1645
1704
  if body.empty?
1646
1705
  puts "Aborted: empty comment"
1647
1706
  next
1648
1707
  end
1649
1708
 
1650
- prs.each do |pr|
1651
- puts "Commenting on ##{pr['number']}: #{pr['title']}"
1652
- system('gh', 'pr', 'comment', pr['number'].to_s, '--body', body)
1709
+ selected_numbers.each do |num|
1710
+ pr = pinned.find { |p| p['number'].to_s == num }
1711
+ title = pr ? pr['title'] : num
1712
+ puts "Commenting on ##{num}: #{title}"
1713
+ system('gh', 'pr', 'comment', num, '--body', body)
1653
1714
  end
1654
1715
  end
1655
1716
 
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.252"
2
+ VERSION = "0.1.253"
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.252
4
+ version: 0.1.253
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota