Skip to content

Commit

Permalink
gitc ready will reopen pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed May 2, 2012
1 parent 07b5ffd commit e9f3801
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/gitcycle.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -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,
Expand Down

0 comments on commit e9f3801

Please sign in to comment.