Class: TaskWithCommit

Inherits:
Task
  • Object
show all
Defined in:
lib/caperoma/models/tasks/task_with_commit.rb

Direct Known Subclasses

Fix, TaskWithSeparateBranch

Instance Attribute Summary

Attributes inherited from Task

#additional_time

Instance Method Summary collapse

Methods inherited from Task

#abort, abort_started, abort_started_without_time, #abort_without_time, finish_started, #jira_live_url, pause_started, #pivotal_url, status, #time_spent, #time_spent_in_minutes, #time_spent_so_far

Methods included from Git

#git_branch, #git_checkout, #git_commit, #git_current_branch, #git_last_commit_name, #git_pull_request, #git_push, #git_rebase_to_upstream

Instance Method Details

#finish(comment) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/caperoma/models/tasks/task_with_commit.rb', line 5

def finish(comment)
  super
  git_commit(commit_message)
  # here I should pass the path
  `rubocop -a "#{project.folder_path}"` if ENV['CAPEROMA_INTEGRATION_TEST'].blank? && ENV['CAPEROMA_TEST'].blank?
  git_commit(commit_rubocop_message)
  git_push 
end

#pause(comment) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/caperoma/models/tasks/task_with_commit.rb', line 14

def pause(comment)
  super
  git_commit(commit_message)
  `rubocop -a "#{project.folder_path}"` if ENV['CAPEROMA_INTEGRATION_TEST'].blank? && ENV['CAPEROMA_TEST'].blank?
  git_commit(commit_rubocop_message)
  git_push
end