lib/pivotal-integration/command/finish.rb
# Finishes a Pivotal Tracker story by doing the following steps:
# * Check that the pending merge will be trivial
# * Merge the development branch into the root branch
# * Delete the development branch
# * Push changes to remote
#
# @return [void]
Finishes a Pivotal Tracker story by doing the following steps:
Check that the pending merge will be trivial
Merge the development branch into the root branch
Delete the development branch
Push changes to remote
Finishes a Pivotal Tracker story by doing the following steps : Check that the pending merge will be trivial Merge the development branch into the root branch Delete the development branch Push changes to remote
def run(*arguments)
    no_complete = @options.fetch(:no_complete, false)
    no_delete = @options.fetch(:no_delete, false)
    no_merge = @options.fetch(:no_merge, false)
    pull_request = @options.fetch(:pull_request, false) || PivotalIntegration::Util::Git.finish_mode == :pull_request
    if pull_request
      PivotalIntegration::Util::Git.push PivotalIntegration::Util::Git.branch_name
      PivotalIntegration::Util::Git.create_pull_request(@configuration.story)
      PivotalIntegration::Util::Story.mark(@configuration.story, :finished)
      return
    end
    unless no_merge
      PivotalIntegration::Util::Git.trivial_merge?
      PivotalIntegration::Util::Git.merge(@configuration.story, no_complete, no_delete)
    end
    PivotalIntegration::Util::Git.push 
  end
def run ( * arguments ) no_complete = @options . fetch ( :no_complete , false ) no_delete = @options . fetch ( :no_delete , false ) no_merge = @options . fetch ( :no_merge , false ) pull_request = @options . fetch ( :pull_request , false ) || PivotalIntegration :: Util :: Git . finish_mode == :pull_request if pull_request PivotalIntegration :: Util :: Git . push PivotalIntegration :: Util :: Git . branch_name PivotalIntegration :: Util :: Git . create_pull_request ( @configuration . story ) PivotalIntegration :: Util :: Story . mark ( @configuration . story , :finished ) return end unless no_merge PivotalIntegration :: Util :: Git . trivial_merge? PivotalIntegration :: Util :: Git . merge ( @configuration . story , no_complete , no_delete ) end PivotalIntegration :: Util :: Git . push end
Finishes a Pivotal Tracker story by doing the following steps:
 Check that the pending merge will be trivial
 Merge the development branch into the root branch
 Delete the development branch
 Push changes to remote
Finishes a Pivotal Tracker story by doing the following steps : Check that the pending merge will be trivial Merge the development branch into the root branch Delete the development branch Push changes to remote
None
void
arguments