Sha256: 31794372063bcabb6652951abcc716e924dd6abbfceae7992ae49eaca32bf704

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require "thor"
require "cp8_cli"

module Cp8Cli
  class App < Thor
    desc "start [URL|NAME]", "Assign self to story and create new branch"
    def start(name = nil)
      main.start(name)
    end

    desc "submit", "Pushes branch to GitHub and opens a PR"
    method_option :wip, desc: "Flag PR as WIP", type: :boolean
    def submit
      main.finish(options.to_h.symbolize_keys)
    end

    desc "open", "Open current story in browser"
    def open
      main.open
    end

    private

      def main
        Main.new
      end
  end
end

Cp8Cli::App.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cp8_cli-4.0.1 exe/cp8