Sha256: c9a288a53d70a2dd697a83791995df091d67443de13f3f9b186510901a9d2b49

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 KB

Contents

desc 'review will push your latest feature branch changes to your remote repo and create a pull request'
arg_name 'Describe arguments to review here'
command :review do |c|
  c.desc 'push your latest feature branch changes to your remote repo and create a pull request against the destination branch'
  c.arg_name '[destination_branch] - the branch you want to merge your feature branch into'
  c.action do |global_options,options,args|
    review_options = {'base' => nil, 'title' => nil, 'body' => nil}
    case args.length
    when 3
      review_options['base'] = args[0]
      review_options['title'] = args[1]
      review_options['body'] = args[2]
    when 2
      review_options['base'] = args[0]
      review_options['title'] = args[1]
      review_options['body'] = review_options['title']
    when 1
      review_options['base'] = args[0]
      review_options['title'] = review_options['body'] = GitReflow.get_first_commit_message
    else
      review_options['title'] = review_options['body'] = GitReflow.get_first_commit_message
    end
    GitReflow.review review_options
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
git_reflow-0.3.2 lib/git_reflow/commands/review.rb
git_reflow-0.3.1 lib/git_reflow/commands/review.rb
git_reflow-0.2.5 lib/git_reflow/commands/review.rb
git_reflow-0.2.4 lib/git_reflow/commands/review.rb