Sha256: 493b6c0a2a87d5e0cee6c64fc0ad1caba4eaea082353f6be956d9f6c0c39859f

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

class Gitmine::CLI
  def self.run
    case ARGV[0]
    when "log"
      list
    when "branch", "br"
      branch
    when "checkout", "co"
      checkout
    when "delete", "del"
      delete
    when "for_deploy", "reviewed"
      reviewed
    else
      puts <<-EOS
Usage:
gitmine branch BRANCH_NAME
  Create a new branch, push to origin, add github links to gitmine ticket
  Example: gitmine branch 1234-my-branch

gitmine checkout ISSUE_ID
  Checkout remote/local branch starting with ISSUE_ID
  Example: gitmine checkout 1234

gitmine reviewed ISSUE_ID
  Merge the branch to master, delete remote branch, update redmine issue status
  Example: gitmine reviewed 1234

gitmine delete ISSUE_ID
  Delete remote branch starting with ISSUE_ID
  Example: gitmine delete 1234

gitmine log
  Displays latest 10 commits and the status of their associated Redmine tickets
EOS
    end
  end

  def self.list
    Gitmine.list
  end

  def self.branch
    Gitmine.branch(ARGV[1])
  end

  def self.checkout
    Gitmine.checkout(ARGV[1])
  end

  def self.delete
    Gitmine.delete(ARGV[1])
  end

  def self.reviewed
    Gitmine.reviewed(ARGV[1])
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gitmine-0.1.16 lib/gitmine/cli.rb
gitmine-0.1.15 lib/gitmine/cli.rb
gitmine-0.1.14 lib/gitmine/cli.rb
gitmine-0.1.13 lib/gitmine/cli.rb