Skip to content

Commit

Permalink
Add switch to skip lgtm checks on deliver
Browse files Browse the repository at this point in the history
[Deliver #34870873]
Closes #32

LGTM given by: @armyofgnomes

Squashed commit of the following:

commit 81eff4b
Author: Valentino <[email protected]>
Date:   Tue Sep 25 09:30:26 2012 -0400

    cleanup help message for skip-lgtm switch

commit a6fba34
Author: Valentino <[email protected]>
Date:   Tue Sep 25 09:27:32 2012 -0400

    Add switch to skip lgtm checks on deliver
  • Loading branch information
Valentino committed Sep 25, 2012
1 parent 1c9119f commit 4d1d1ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git_reflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def deliver(options = {})
open_comment_authors = find_authors_of_open_pull_request_comments(existing_pull_request)

# if there any comment_authors left, then they haven't given a lgtm after the last commit
if open_comment_authors.empty?
if open_comment_authors.empty? or options['skip-lgtm']
lgtm_authors = comment_authors_for_pull_request(existing_pull_request, :with => LGTM)
commit_message = get_first_commit_message
puts "Merging pull request ##{existing_pull_request.number}: '#{existing_pull_request.title}', from '#{existing_pull_request.head.label}' into '#{existing_pull_request.base.label}'"
Expand Down
3 changes: 3 additions & 0 deletions lib/git_reflow/commands/deliver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
long_desc 'merge your feature branch down to your base branch, and cleanup your feature branch'

command :deliver do |c|
c.desc 'skip the lgtm checks and deliver your feature branch'
c.switch [:f, :'skip-lgtm']
c.desc 'merge your feature branch down to your base branch, and cleanup your feature branch'
c.arg_name 'base_branch - the branch you want to merge into'
c.action do |global_options,options,args|
Expand All @@ -13,6 +15,7 @@
when 1
deliver_options['base'] = args[0]
end
deliver_options.merge({'skip_lgtm' => options[:'skip-lgtm']})
GitReflow.deliver deliver_options
end
end

0 comments on commit 4d1d1ed

Please sign in to comment.