Class: Lazylead::Task::Loading
- Inherits:
-
Object
- Object
- Lazylead::Task::Loading
- Defined in:
- lib/lazylead/task/loading.rb
Overview
Notification about team loading
Instance Method Summary collapse
-
#initialize(log = Log.new) ⇒ Loading
constructor
A new instance of Loading.
- #run(sys, postman, opts) ⇒ Object
Constructor Details
Instance Method Details
#run(sys, postman, opts) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/lazylead/task/loading.rb', line 38 def run(sys, postman, opts) assignments = sys.issues(opts["jql"], opts.jira_defaults) .group_by(&:assignee) .to_h { |user, tasks| [user.id, Teammate.new(user, tasks)] } opts.slice("team", ",") .map { |m| m.split(":") } .each { |id, name| assignments[id] = Free.new(id, name) unless assignments.key? id } return if assignments.empty? postman.send opts.merge(assignments: assignments) end |