Class: Lazylead::Task::OnlyLL
- Inherits:
-
Object
- Object
- Lazylead::Task::OnlyLL
- Defined in:
- lib/lazylead/task/accuracy/onlyll.rb
Overview
Ensure that ticket accuracy evaluation labels are set only by LL, not by
some person.
The task supports the following features:
- fetch issues from remote ticketing system by query
- check the history of labels modification
- remove evaluation labels if they set not by LL
Instance Method Summary collapse
-
#initialize(log = Log.new) ⇒ OnlyLL
constructor
A new instance of OnlyLL.
- #run(sys, postman, opts) ⇒ Object
Constructor Details
Instance Method Details
#run(sys, postman, opts) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/lazylead/task/accuracy/onlyll.rb', line 43 def run(sys, postman, opts) found = sys.issues(opts["jql"], opts.jira_defaults.merge(expand: "changelog")) .map { |i| Labels.new(i, opts) } .select(&:exists?) .reject(&:valid?) .each(&:remove) postman.send opts.merge(tickets: found) unless found.empty? end |