Class: V1gittools::DevelopStoryTool
- Defined in:
- lib/v1gittools/develop_story_tool.rb
Instance Attribute Summary
Attributes inherited from BaseTool
#args, #config, #git, #github, #repo_config, #v1
Instance Method Summary collapse
Methods inherited from BaseTool
#check_proper_init, #initialize
Constructor Details
This class inherits a constructor from V1gittools::BaseTool
Instance Method Details
#develop(v1_story_id, branch_name = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/v1gittools/develop_story_tool.rb', line 4 def develop(v1_story_id, branch_name=nil) branch_name ||= v1_story_id v1_story = v1.getAsset(v1_story_id.dup) if v1_story.nil? puts "Sorry, story/defect #{v1_story_id} not found! Can't start development on unknown story/defect!" return end git.checkout(repo_config[:develop_branch]) git.pull(repo_config[:github_remote], repo_config[:develop_branch]) git.branch(branch_name).checkout repo_config[:branches][branch_name] = v1_story_id V1gittools::update_repo_config v1.updateAsset(v1_story.getProp(:_sObjectType__id), v1_story.getProp(:_iObjectId__id),'Status', config[:v1_story_statuses][:develop]) v1_story = v1.getAsset(v1_story_id.dup) puts " - Switched to a new branch '#{branch_name}' based off of '#{repo_config[:develop_branch]}'." puts " - Set #{v1_story_id} to the status #{v1_story.getProp(:"Status.Name")}.\n\n" puts "Implement story/defect in branch (Don't forget to push!). When complete, use:\n\n" puts " v1git qa\n\n" end |