Class: Gitlab::HookData::GroupBuilder

Inherits:
BaseBuilder show all
Defined in:
lib/gitlab/hook_data/group_builder.rb

Direct Known Subclasses

SubgroupBuilder

Constant Summary

Constants inherited from BaseBuilder

BaseBuilder::MARKDOWN_SIMPLE_IMAGE

Instance Attribute Summary

Attributes inherited from BaseBuilder

#object

Instance Method Summary collapse

Methods inherited from BaseBuilder

#initialize

Constructor Details

This class inherits a constructor from Gitlab::HookData::BaseBuilder

Instance Method Details

#build(event) ⇒ Object

Sample data

:created_at=>"2021-01-20T09:40:12Z",
:updated_at=>"2021-01-20T09:40:12Z",
:event_name=>"group_rename",
:name=>"group1",
:path=>"group1",
:full_path=>"group1",
:group_id=>1,
:old_path=>"old-path",
:old_full_path=>"old-path"



21
22
23
24
25
26
27
28
# File 'lib/gitlab/hook_data/group_builder.rb', line 21

def build(event)
  [
    timestamps_data,
    event_data(event),
    group_data,
    event_specific_group_data(event)
  ].reduce(:merge)
end