Sha256: eb7face49ed77e5847c7dfba8be399c9f61fb610b42758cad9d0d846cf9ed29a
Contents?: true
Size: 1.54 KB
Versions: 21
Compression:
Stored size: 1.54 KB
Contents
# frozen_string_literal: true require 'eac_ruby_utils/console/docopt_runner' require 'eac_ruby_utils/console/speaker' require 'avm/git/issue/complete' module Avm module Tools class Runner < ::EacRubyUtils::Console::DocoptRunner class Git < ::EacRubyUtils::Console::DocoptRunner class Issue < ::EacRubyUtils::Console::DocoptRunner class Complete < ::EacRubyUtils::Console::DocoptRunner include ::EacRubyUtils::Console::Speaker DOC = <<~DOCOPT Closes a issue in a Git repository. Usage: __PROGRAM__ [options] __PROGRAM__ -h | --help Options: -h --help Show this screen. -B --no-validate-branch Does not validate branch/tag name. -y --yes Does not ask for user confirmation. DOCOPT def run complete = ::Avm::Git::Issue::Complete.new(git_complete_issue_options) complete.start_banner fatal_error('Some validation did not pass') unless complete.valid? complete.run if confirm? end private def confirm? options.fetch('--yes') || request_input('Confirm issue completion?', bool: true) end def git_complete_issue_options { dir: context(:repository_path), no_validate_branch: options.fetch('--no-validate-branch') } end end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
avm-tools-0.14.0 | lib/avm/tools/runner/git/issue/complete.rb |