Module: StoryGuard

Defined in:
lib/story_guard.rb,
lib/story_guard/version.rb,
lib/story_guard/git_reader.rb

Defined Under Namespace

Modules: GitReader

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.go!Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/story_guard.rb', line 5

def self.go!
  project = PivotalTracker::Project.find(ENV['TRACKER_PROJECT_ID'])
  stories = project.stories.all(state: %w(started finished delivered rejected), story_type: %w(bug feature))
  puts 'The following stories are not accepted in tracker, but have commits'
  stories.select do |story|
    GitReader.grep_log(story.id).length > 0
  end.each do |story|
    puts "[#{story.id}] #{story.name} (#{story.url})"
  end
end