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.new) ⇒ MissingComment

Returns a new instance of MissingComment.



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

def initialize(log = Log.new)
  @log = log
end

Instance Method Details

#run(sys, postman, opts) ⇒ Object



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

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