Class: GitScf::Start

Inherits:
Object
  • Object
show all
Defined in:
lib/git_scf/subcommands/start.rb

Instance Method Summary collapse

Constructor Details

#initialize(ticket, logger) ⇒ Start

Returns a new instance of Start.



3
4
5
6
# File 'lib/git_scf/subcommands/start.rb', line 3

def initialize(ticket, logger)
  @ticket = ticket
  @logger = logger
end

Instance Method Details

#executeObject



8
9
10
11
12
13
14
15
16
# File 'lib/git_scf/subcommands/start.rb', line 8

def execute
  `git checkout develop`
  `git pull`
  `git flow feature start #{@ticket.branch_name}`
  @logger.add("Started #{@ticket.branch_name}")
  `git add .`
  `git commit -am "#{@ticket.id} #in-progress"`
  `git flow feature publish #{@ticket.branch_name}`
end