Class: Agentilda::CLI::Resync::Prs
- Defined in:
- lib/agentilda/cli/resync/subcommands/prs.rb
Overview
resync prs — put an [NNN.MM] prefix on every pull request title.
Constant Summary
Constants included from UI
UI::MAX_WIDTH, UI::METER_WIDTH, UI::MIN_WIDTH, UI::NO_FAILURE, UI::NO_FIELDS, UI::NO_TIMEOUT, UI::PROGRESS_THRESHOLD, UI::TIMER_WARNING, UI::TIMER_WIDTH
Instance Method Summary collapse
Methods inherited from Base
Methods included from UI
abbreviate, activity_for, animate?, box, box_height, color?, concurrently, countdown, default_jobs, display_width, elapsed, #error, fit, #info, line, log, logging_activity, meter, monotonic, once, paint, #paint, pastel, popup, report_line, reset!, said, #say, solo_spinner, spinning, stepping, #success, threaded, tty?, #warn, width
Instance Method Details
#call(**options) ⇒ void
This method returns an undefined value.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/agentilda/cli/resync/subcommands/prs.rb', line 27 def call(**) github = GitHub.new tree = tree_for() changes = Agentilda::Resync::Prs.new(tree:, github:, adopt: .fetch(:adopt, true), root: File.dirname(tree.dir)) .call(commit: commit?()) if changes.empty? success("Every pull request title already carries a prefix.") unless quiet?() return end changes.each do |change| puts "#{change.number}\t#{change.new_title || "-"}\t#{change.reason}" end return if quiet?() report_pr_changes(changes, ) rescue Agentilda::Error => e refuse(e., 69) end |