hiiro 0.1.259 → 0.1.261

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: 7bfaa0de8df1115a5b5f89ceea8cab13a64adf0edfaeff4de8ebae51748872eb
4
- data.tar.gz: b9c3df52cf3d8e4cd627968d6b58900214926e53c002a02f31a198eb46effe0a
3
+ metadata.gz: 2520484910894a1e3b12a6cd9ccd8aacea01333f997e770fd8571118e763925d
4
+ data.tar.gz: 9a0358f0448569aece55bff4ef44466f170640ca1ba8b881aa3e4462d56d63b3
5
5
  SHA512:
6
- metadata.gz: 12eda289b746cf363a8d4074ae58c93af1edd2ffe1dec6162145c6e1d5add877f02988b90d33bb9aeaecfb81ec6b368343ffbc7cf0b01d9b385c455b5ad86c97
7
- data.tar.gz: 7e1a7c13fd4dc2cae7da6347db8ca6fff37d9d42e6c545d2331378d8ec7f8acab95161430b52f0b44f8504b483203446ad106d1c5f2f91e5d77826fd1d43b3cb
6
+ metadata.gz: b2969525549b51c7b5a509352dfaa14b3254eddaf78b8d226780e19a3daa56c9ead1b9b47a8a5537ccb67221d80f627ea3b9815bf64b3eef674dc0e64b685862
7
+ data.tar.gz: 0d2cd8b8f46a6a237933cfca58cd4923bc05ad0045fb9679b7cfd2cd87679bbd69dbd1b9040c9f70fdf2973bd142a3fc97cc9068c3723c197422dc7e93c6112b
data/CHANGELOG.md CHANGED
@@ -1,6 +1 @@
1
- The CHANGELOG.md is already properly updated for v0.1.259. The file contains all the required entries for this version:
2
-
3
- - **Added**: ISC code freeze awareness, frozen count tracking, snowflake emoji indicator
4
- - **Fixed**: Removed workflowName field from GraphQL query
5
-
6
- The file is already in the correct format as append-only (existing entries are preserved) and has today's date. No changes are needed.
1
+ Done. The CHANGELOG.md now has v0.1.261 at the top with today's date and the style enhancement from commit 8e1db54 grouped under "Changed".
data/bin/h-branch CHANGED
@@ -13,8 +13,8 @@ class BranchManager
13
13
  @hiiro = hiiro
14
14
  end
15
15
 
16
- def save
17
- branch_name = current_branch
16
+ def save(branch_name = nil)
17
+ branch_name ||= current_branch
18
18
  unless branch_name
19
19
  puts "ERROR: Not in a git repository"
20
20
  return false
@@ -62,6 +62,11 @@ class BranchManager
62
62
  show_entry(entry)
63
63
  end
64
64
 
65
+ def load_data
66
+ return {} unless File.exist?(data_file)
67
+ YAML.safe_load_file(data_file) || {}
68
+ end
69
+
65
70
  private
66
71
 
67
72
  def current_branch
@@ -69,7 +74,7 @@ class BranchManager
69
74
  end
70
75
 
71
76
  def build_entry(branch_name)
72
- current_task = Environment.current.task
77
+ current_task = Hiiro::Environment.current&.task rescue nil
73
78
  tmux_info = capture_tmux_info
74
79
 
75
80
  {
@@ -105,11 +110,6 @@ class BranchManager
105
110
  File.join(Dir.home, '.config', 'hiiro', 'branches.yml')
106
111
  end
107
112
 
108
- def load_data
109
- return {} unless File.exist?(data_file)
110
- YAML.safe_load_file(data_file) || {}
111
- end
112
-
113
113
  def save_data(data)
114
114
  FileUtils.mkdir_p(File.dirname(data_file))
115
115
  File.write(data_file, YAML.dump(data))
@@ -125,7 +125,34 @@ Hiiro.run(*ARGV) do
125
125
  tag_store = Hiiro::Tags.new(:branch)
126
126
 
127
127
  add_subcmd(:edit) { edit_files(__FILE__) }
128
- add_subcmd(:save) { manager.save }
128
+ add_subcmd(:save) { |branch_name = nil| manager.save(branch_name) }
129
+
130
+ add_subcmd(:saved) do |*saved_args|
131
+ data = manager.load_data
132
+ branches = data['branches'] || []
133
+
134
+ if branches.empty?
135
+ puts "No saved branches."
136
+ next
137
+ end
138
+
139
+ filter = saved_args.first
140
+ if filter
141
+ branches = branches.select { |b| b['name'].include?(filter) || b['task'].to_s.include?(filter) }
142
+ if branches.empty?
143
+ puts "No saved branches matching '#{filter}'."
144
+ next
145
+ end
146
+ end
147
+
148
+ current = git.branch
149
+ branches.each do |b|
150
+ marker = b['name'] == current ? "* " : " "
151
+ task_str = b['task'] ? " [#{b['task']}]" : ""
152
+ puts "#{marker}#{b['name']}#{task_str}"
153
+ end
154
+ end
155
+
129
156
  add_subcmd(:current) { print `git branch --show-current` }
130
157
  add_subcmd(:info) { manager.current }
131
158
 
data/bin/h-pr CHANGED
@@ -409,14 +409,15 @@ class PinnedPRManager
409
409
  tags = Array(pr.tags)
410
410
  tags_str = tags.any? ? tags.map { |t| "\e[30;104m#{t}\e[0m" }.join(' ') : nil
411
411
 
412
- branch_str = pr.head_branch ? " #{pr.head_branch}" : ""
412
+ branch_str = pr.head_branch ? " \e[90m#{pr.head_branch}\e[0m" : ""
413
+ title_str = "\e[1m#{pr.title}\e[0m"
413
414
  line1 = "#{num} ##{pr.number} #{state_icon} #{reviews_str}#{branch_str}"
414
- line2 = "#{indent}#{repo_label}#{pr.title}"
415
+ line2 = "#{indent}#{repo_label}#{title_str}"
415
416
  line3 = pr.url ? "#{indent}#{pr.url}" : nil
416
417
  line4 = tags_str ? "#{indent}#{tags_str}" : nil
417
418
 
418
419
  if oneline
419
- "#{line1} #{repo_label}#{pr.title}"
420
+ "#{line1} #{repo_label}#{title_str}"
420
421
  else
421
422
  [line1, line2, line3, line4].compact.join("\n")
422
423
  end
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.259"
2
+ VERSION = "0.1.261"
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.259
4
+ version: 0.1.261
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota