Class: GitScf::Finish

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

Instance Method Summary collapse

Constructor Details

#initialize(ticket) ⇒ Finish

Returns a new instance of Finish.



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

def initialize(ticket)
  @ticket = ticket
end

Instance Method Details

#executeObject



7
8
9
10
11
12
13
# File 'lib/git_scf/subcommands/finish.rb', line 7

def execute
  `git commit --allow-empty --all -m "#{@ticket.id} #done (jira status update)"`
  `git push`
  `git flow feature finish #{@ticket.branch_name}`
  `git push`
  `git push origin :refs/heads/feature/#{@ticket.branch_name}`
end