Class: GitPivotalTrackerIntegration::Command::Start
- Defined in:
- lib/git-pivotal-tracker-integration/command/start.rb
Overview
The class that encapsulates starting a Pivotal Tracker Story
Instance Method Summary collapse
-
#run(filter) ⇒ void
Starts a Pivotal Tracker story by doing the following steps: * Create a branch * Add default commit hook * Start the story on Pivotal Tracker.
Methods inherited from Base
Constructor Details
This class inherits a constructor from GitPivotalTrackerIntegration::Command::Base
Instance Method Details
#run(filter) ⇒ void
This method returns an undefined value.
Starts a Pivotal Tracker story by doing the following steps:
-
Create a branch
-
Add default commit hook
-
Start the story on Pivotal Tracker
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/git-pivotal-tracker-integration/command/start.rb', line 36 def run(filter) story = GitPivotalTrackerIntegration::Util::Story.select_story @project, filter GitPivotalTrackerIntegration::Util::Story.pretty_print story development_branch_name = development_branch_name story GitPivotalTrackerIntegration::Util::Git.create_branch development_branch_name @configuration.story = story GitPivotalTrackerIntegration::Util::Git.add_hook 'prepare-commit-msg', File.join(File.dirname(__FILE__), 'prepare-commit-msg.sh') start_on_tracker story end |