hiiro 0.1.291 → 0.1.293
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 +11 -0
- data/bin/h-pr +15 -23
- data/lib/hiiro/pinned_pr_manager.rb +16 -4
- 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: 20e69313f458dee5ff24926e4c905ea46bcfa67146f45df57f08e5692c0c9005
|
|
4
|
+
data.tar.gz: cf1b62233a0c03e1bc024ec966b88b9687cbc384b2cbf593dae30b9587ade3ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3db13bf516d8dfa5db32bd1480de76d886ed1dc51f9465749b4ee6f7b2ce75e420cc035bf3446828fe70383aa6b2fd315c6f76ae8f7bfb7dd2943250dc7a7ff
|
|
7
|
+
data.tar.gz: 402ff47ab1de9c80d226c853914ed7c2a9d21a03e2d275138545a73551bdbc62275a8e53bf884dafdfa8037b6f55b93ecb98cf90b63cf89eb32f2c512f6ad4dc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
```markdown
|
|
2
|
+
## v0.1.293 (2026-03-26)
|
|
3
|
+
|
|
4
|
+
### Changed
|
|
5
|
+
- `h pr update`: filter options now extracted to `PinnedPRManager` for better code organization and reusability
|
|
6
|
+
|
|
7
|
+
## v0.1.292 (2026-03-26)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- `h pr update`: now accepts filter flags (`--active`, `--failing`, `--ready`, `--all`) to control which PRs are refreshed and displayed after update
|
|
11
|
+
|
|
2
12
|
## v0.1.291 (2026-03-26)
|
|
3
13
|
|
|
4
14
|
### Added
|
|
5
15
|
- `Options#mutual_exclusion(*names)` — star-topology mutual exclusion: first flag is the hub (clears all others when set); any other flag only clears the hub (spokes can coexist freely); last encountered in argv wins
|
|
6
16
|
- `h pr ls`: new `--all`/`-a` flag (show all tracked PRs, no filter); all filter flags are declared mutually exclusive so `-oa`, `-ao`, `--all --active` etc. do the right thing
|
|
17
|
+
- `h pr update`: now accepts the same filter flags as `h pr ls` and passes them through, so `h pr update -r` refreshes then shows only failing PRs
|
|
7
18
|
|
|
8
19
|
## v0.1.290 (2026-03-26)
|
|
9
20
|
|
data/bin/h-pr
CHANGED
|
@@ -7,20 +7,8 @@ require "yaml"
|
|
|
7
7
|
require "json"
|
|
8
8
|
require "tempfile"
|
|
9
9
|
|
|
10
|
-
FILTER_OPTS = Proc.new {
|
|
11
|
-
flag(:red, short: 'r', desc: 'filter: failing checks')
|
|
12
|
-
flag(:green, short: 'g', desc: 'filter: passing checks')
|
|
13
|
-
flag(:conflicts, short: 'c', desc: 'filter: merge conflicts')
|
|
14
|
-
flag(:drafts, short: 'D', desc: 'filter: draft PRs')
|
|
15
|
-
flag(:pending, short: 'p', desc: 'filter: pending checks')
|
|
16
|
-
flag(:merged, short: 'm', desc: 'filter: merged PRs')
|
|
17
|
-
flag(:active, short: 'o', desc: 'filter: open (non-merged) PRs')
|
|
18
|
-
flag(:numbers, short: 'n', desc: 'output PR numbers only (no #)')
|
|
19
|
-
option(:tag, short: 't', desc: 'filter by tag (OR when multiple; AND with flag filters)', multi: true)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
23
|
-
pinned_manager = Hiiro::PinnedPRManager.new
|
|
11
|
+
pm = pinned_manager = Hiiro::PinnedPRManager.new
|
|
24
12
|
Hiiro::PinnedPRManager.add_resolvers(self)
|
|
25
13
|
|
|
26
14
|
watch_block = ->(original_pr_number=nil, *watch_args) {
|
|
@@ -239,7 +227,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
239
227
|
flag(:checks, short: 'C', desc: 'show individual check run details')
|
|
240
228
|
flag(:diff, short: 'd', desc: 'open diff for selected PR')
|
|
241
229
|
flag(:all, short: 'a', desc: 'show all tracked PRs (no filter)')
|
|
242
|
-
|
|
230
|
+
pm.add_options(self)
|
|
243
231
|
mutual_exclusion(:all, :active, :merged, :drafts, :red, :green, :pending, :conflicts)
|
|
244
232
|
}
|
|
245
233
|
|
|
@@ -326,6 +314,13 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
326
314
|
end
|
|
327
315
|
|
|
328
316
|
add_subcmd(:update) do |*update_args|
|
|
317
|
+
opts = Hiiro::Options.parse(update_args) {
|
|
318
|
+
flag(:force_update, long: 'force-update', short: 'u', desc: 'force refresh even if recently checked')
|
|
319
|
+
flag(:all, short: 'a', desc: 'show all tracked PRs (no filter)')
|
|
320
|
+
pm.add_options(self)
|
|
321
|
+
mutual_exclusion(:all, :active, :merged, :drafts, :red, :green, :pending, :conflicts)
|
|
322
|
+
}
|
|
323
|
+
|
|
329
324
|
pinned = pinned_manager.load_pinned
|
|
330
325
|
|
|
331
326
|
if pinned.empty?
|
|
@@ -333,20 +328,17 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
333
328
|
next
|
|
334
329
|
end
|
|
335
330
|
|
|
336
|
-
force = update_args.include?('-U') || update_args.include?('--force-update')
|
|
337
|
-
|
|
338
331
|
puts "Updating status for #{pinned.length} PR(s)..."
|
|
339
|
-
pinned_manager.refresh_all_status(pinned, force:
|
|
332
|
+
pinned_manager.refresh_all_status(pinned, force: opts.force_update)
|
|
340
333
|
pinned_manager.save_pinned(pinned)
|
|
341
334
|
puts "Done."
|
|
342
335
|
|
|
343
336
|
puts
|
|
344
|
-
run_subcmd(:ls)
|
|
345
|
-
|
|
337
|
+
run_subcmd(:ls, *opts.original_args)
|
|
346
338
|
end
|
|
347
339
|
|
|
348
340
|
add_subcmd(:green) do |*green_args|
|
|
349
|
-
opts = Hiiro::Options.parse(green_args
|
|
341
|
+
opts = Hiiro::Options.parse(green_args) { |o| pm.add_options(o) }
|
|
350
342
|
pinned = pinned_manager.load_pinned
|
|
351
343
|
results = pinned_manager.apply_filters(pinned, opts, forced: [:green])
|
|
352
344
|
|
|
@@ -363,7 +355,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
363
355
|
end
|
|
364
356
|
|
|
365
357
|
add_subcmd(:red) do |*red_args|
|
|
366
|
-
opts = Hiiro::Options.parse(red_args
|
|
358
|
+
opts = Hiiro::Options.parse(red_args) { |o| pm.add_options(o) }
|
|
367
359
|
pinned = pinned_manager.load_pinned
|
|
368
360
|
results = pinned_manager.apply_filters(pinned, opts, forced: [:red])
|
|
369
361
|
|
|
@@ -380,7 +372,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
380
372
|
end
|
|
381
373
|
|
|
382
374
|
add_subcmd(:old) do |*old_args|
|
|
383
|
-
opts = Hiiro::Options.parse(old_args
|
|
375
|
+
opts = Hiiro::Options.parse(old_args) { |o| pm.add_options(o) }
|
|
384
376
|
pinned = pinned_manager.load_pinned
|
|
385
377
|
results = pinned_manager.apply_filters(pinned, opts, forced: [:merged])
|
|
386
378
|
|
|
@@ -424,7 +416,7 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
|
|
|
424
416
|
end
|
|
425
417
|
|
|
426
418
|
add_subcmd(:draft) do |*draft_args|
|
|
427
|
-
opts = Hiiro::Options.parse(draft_args
|
|
419
|
+
opts = Hiiro::Options.parse(draft_args) { |o| pm.add_options(o) }
|
|
428
420
|
pinned = pinned_manager.load_pinned
|
|
429
421
|
results = pinned_manager.apply_filters(pinned, opts, forced: [:drafts])
|
|
430
422
|
|
|
@@ -55,14 +55,26 @@ class Hiiro
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
def pr_repo(pr)
|
|
59
|
-
pr.repo || Hiiro::Git::Pr.repo_from_url(pr.url)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
58
|
def initialize
|
|
63
59
|
ensure_file
|
|
64
60
|
end
|
|
65
61
|
|
|
62
|
+
def add_options(opts)
|
|
63
|
+
opts.flag(:red, short: 'r', desc: 'filter: failing checks')
|
|
64
|
+
opts.flag(:green, short: 'g', desc: 'filter: passing checks')
|
|
65
|
+
opts.flag(:conflicts, short: 'c', desc: 'filter: merge conflicts')
|
|
66
|
+
opts.flag(:drafts, short: 'D', desc: 'filter: draft PRs')
|
|
67
|
+
opts.flag(:pending, short: 'p', desc: 'filter: pending checks')
|
|
68
|
+
opts.flag(:merged, short: 'm', desc: 'filter: merged PRs')
|
|
69
|
+
opts.flag(:active, short: 'o', desc: 'filter: open (non-merged) PRs')
|
|
70
|
+
opts.flag(:numbers, short: 'n', desc: 'output PR numbers only (no #)')
|
|
71
|
+
opts.option(:tag, short: 't', desc: 'filter by tag (OR when multiple; AND with flag filters)', multi: true)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def pr_repo(pr)
|
|
75
|
+
pr.repo || Hiiro::Git::Pr.repo_from_url(pr.url)
|
|
76
|
+
end
|
|
77
|
+
|
|
66
78
|
def ensure_file
|
|
67
79
|
dir = File.dirname(Hiiro::Git::Pr::PINNED_FILE)
|
|
68
80
|
FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
|
data/lib/hiiro/version.rb
CHANGED