Class: TrackerGitHook::StoryStatusChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/tracker_git_hook/story_status_checker.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo:) ⇒ StoryStatusChecker

Returns a new instance of StoryStatusChecker.



3
4
5
# File 'lib/tracker_git_hook/story_status_checker.rb', line 3

def initialize(repo:)
  @repo = repo
end

Instance Method Details

#check(message) ⇒ Object



7
8
9
10
11
# File 'lib/tracker_git_hook/story_status_checker.rb', line 7

def check(message)
  if repo.current_story_id && contains_completion_keyword?(message) && contains_current_story_id?(message)
    repo.clear_story_id
  end
end