Sha256: 6be90cab75eda5fdc33fa52e169235a5e50f519dc0038c6b69127e84b114ba95

Contents?: true

Size: 842 Bytes

Versions: 2

Compression:

Stored size: 842 Bytes

Contents

module GitPrettyAccept
  class App
    include Methadone::Main
    include Methadone::CLILogging

    main do |branch|
      if branch == 'master'
        error "You're trying to accept master as a pull request branch. " +
          "Please checkout to master instead and accept this branch " +
          "from there."
        exit!
      else
        options[:edit] = true if options[:edit].nil?
        options[:autosquash] = true if options[:autosquash].nil?

        Transaction.new(branch, options).call
      end
    end

    description "Accept pull requests, the pretty way"

    on "--[no-]edit", "Edit merge message before committing. (Default: --edit)"
    on "--[no-]autosquash", "Toggle autosquash when rebasing. (Default: --autosquash)"

    arg :branch

    version GitPrettyAccept::VERSION

    use_log_level_option
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_pretty_accept-1.0.0 lib/git_pretty_accept/app.rb
git_pretty_accept-0.5.0 lib/git_pretty_accept/app.rb