Class: GemContribute::CLI::Fix
- Inherits:
-
Object
- Object
- GemContribute::CLI::Fix
- Extended by:
- Dry::Initializer
- Includes:
- Workflow
- Defined in:
- lib/gem_contribute/cli/fix.rb
Overview
‘gem-contribute fix <gem>/<issue#> [-e] [-a] [–no-comment]`
The issue-tied path: run ‘Operations::FixPipeline` (Fork → Clone →Branch → Announce), then optionally open the user’s editor or AI tool. The verb is a thin Result-pattern-matching shell around the pipeline (per ADR-0012).
Constant Summary collapse
- DEFAULT_CLONE_ROOT =
File.("~/code/oss")
Instance Method Summary collapse
Instance Method Details
#run(argv) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gem_contribute/cli/fix.rb', line 34 def run(argv) return missing_clone_root if @clone_root.nil? target, flags = parse_argv(argv) return print_usage_error if target.nil? || !target.include?("/") gem_name, issue = target.split("/", 2) case build_adapter in Success(adapter) project = resolve_target(gem_name, verb: "fix") return 1 if project.nil? execute(adapter, project, issue, flags) in Failure(:unauthenticated) @output.error("Not authenticated. Run `gem-contribute auth login` first.") 1 end end |