Class: Lazylead::Task::MissingComment

Inherits:
Object
  • Object
show all
Defined in:
lib/lazylead/task/missing_comment.rb

Overview

A task which fetch issues by particular ticketing system query language

and find issues where comments has no expected text.

Example:

you have a sub-task for demo session for your story;
demo session is recorded, placed to ftp;
nobody mentioned in comment the ftp location for recorded session.

Such cases needs to be reported.

Instance Method Summary collapse

Constructor Details

#initialize(log = Log::NOTHING) ⇒ MissingComment

Returns a new instance of MissingComment.



39
40
41
# File 'lib/lazylead/task/missing_comment.rb', line 39

def initialize(log = Log::NOTHING)
  @log = log
end

Instance Method Details

#run(sys, postman, opts) ⇒ Object



43
44
45
46
47
48
49
50
# File 'lib/lazylead/task/missing_comment.rb', line 43

def run(sys, postman, opts)
  opts["details"] = "text '#{opts['text']}'" if opts["details"].blank?
  postman.send opts.merge(
    comments: sys.issues(opts["jql"])
                 .map { |i| Comments.new(i, sys) }
                 .reject { |c| c.body? opts["text"] }
  )
end