class GitPivotalTrackerIntegration::Command::Finish

The class that encapsulates finishing a Pivotal Tracker Story

Public Instance Methods

run(argument) click to toggle source

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]

# File lib/git-pivotal-tracker-integration/command/finish.rb, line 30
def run(argument)
  no_complete = argument =~ /--no-complete/

  GitPivotalTrackerIntegration::Util::Git.trivial_merge?
  GitPivotalTrackerIntegration::Util::Git.merge(@configuration.story(@project), no_complete)
  GitPivotalTrackerIntegration::Util::Git.push GitPivotalTrackerIntegration::Util::Git.branch_name
end