Class: Gitloggl::Gitlab::Stack::GroupAgg

Inherits:
Abstract
  • Object
show all
Defined in:
lib/gitloggl/gitlab/stack/group_agg.rb

Instance Attribute Summary

Attributes inherited from Abstract

#app, #env, #options

Instance Method Summary collapse

Methods inherited from Abstract

#call, #initialize, opt

Constructor Details

This class inherits a constructor from Gitloggl::Gitlab::Stack::Abstract

Instance Method Details

#before_callObject



9
10
11
12
13
14
15
16
17
# File 'lib/gitloggl/gitlab/stack/group_agg.rb', line 9

def before_call
  env.issues = env.issues.group_by(&:path).each_with_object([]) do |(_, group), object|
    object.push(group.inject { |a, b| a + b })

    next unless group.many?

    callback!.call(group[1..-1])
  end
end