Skip to content

Commit 4d1d1ed

Browse files
author
Valentino
committed
Add switch to skip lgtm checks on deliver
[Deliver #34870873] Closes #32 LGTM given by: @armyofgnomes Squashed commit of the following: commit 81eff4b Author: Valentino <valentino@reenhanced.com> Date: Tue Sep 25 09:30:26 2012 -0400 cleanup help message for skip-lgtm switch commit a6fba34 Author: Valentino <valentino@reenhanced.com> Date: Tue Sep 25 09:27:32 2012 -0400 Add switch to skip lgtm checks on deliver
1 parent 1c9119f commit 4d1d1ed

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/git_reflow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def deliver(options = {})
7777
open_comment_authors = find_authors_of_open_pull_request_comments(existing_pull_request)
7878

7979
# if there any comment_authors left, then they haven't given a lgtm after the last commit
80-
if open_comment_authors.empty?
80+
if open_comment_authors.empty? or options['skip-lgtm']
8181
lgtm_authors = comment_authors_for_pull_request(existing_pull_request, :with => LGTM)
8282
commit_message = get_first_commit_message
8383
puts "Merging pull request ##{existing_pull_request.number}: '#{existing_pull_request.title}', from '#{existing_pull_request.head.label}' into '#{existing_pull_request.base.label}'"

lib/git_reflow/commands/deliver.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
long_desc 'merge your feature branch down to your base branch, and cleanup your feature branch'
33

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

0 commit comments

Comments
 (0)