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 48 |
# File 'lib/lazylead/task/loading.rb', line 38 def run(sys, postman, opts) assignments = sys.issues(opts["jql"]) .group_by(&:assignee) .map { |user, tasks| [user.id, Teammate.new(user, tasks)] } .to_h 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 |