Permalink
Browse files

gitc ready will reopen pull requests

  • Loading branch information...
1 parent 07b5ffd commit e9f3801a11641e91c3e82a0675788d88761774f8 @winton committed May 2, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/gitcycle.rb
View
7 lib/gitcycle.rb
@@ -422,7 +422,8 @@ def ready(*issues)
branch = pull
if branch && !collab?(branch)
- branch = create_pull_request(branch)
+ force = branch['labels'] && branch['labels'].include?('Pass')
+ branch = create_pull_request(branch, force)
end
if branch == false
@@ -596,7 +597,7 @@ def command_not_recognized
Launchy.open(readme)
end
- def create_pull_request(branch=nil)
+ def create_pull_request(branch=nil, force=false)
unless branch
puts "\nRetrieving branch information from gitcycle.\n".green
branch = get('branch',
@@ -605,7 +606,7 @@ def create_pull_request(branch=nil)
)
end
- if branch && !branch['issue_url']
+ if branch && (force || !branch['issue_url'])
puts "Creating GitHub pull request.\n".green
branch = get('branch',
'branch[create_pull_request]' => true,

0 comments on commit e9f3801

Please sign in to comment.