lib/thegarage/gitx/cli/review_request_command.rb in thegarage-gitx-2.0.2 vs lib/thegarage/gitx/cli/review_request_command.rb in thegarage-gitx-2.0.3
- old
+ new
@@ -1,8 +1,9 @@
require 'thor'
require 'thegarage/gitx'
require 'thegarage/gitx/cli/base_command'
+require 'thegarage/gitx/cli/update_command'
require 'json'
require 'rest_client'
module Thegarage
module Gitx
@@ -27,10 +28,10 @@
fail 'Github authorization token not found' unless authorization_token
branch = current_branch.name
pull_request = find_pull_request(branch)
if pull_request.nil?
- update
+ UpdateCommand.new.update
changelog = run_cmd "git log #{Thegarage::Gitx::BASE_BRANCH}...#{branch} --no-merges --pretty=format:'* %s%n%b'"
pull_request = create_pull_request(branch, changelog, options)
say 'Pull request created: '
say pull_request['html_url'], :green
end