Class: Gitlab::HookData::ProjectBuilder

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

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

event_name: "project_rename",
created_at: "2021-04-19T07:05:36Z",
updated_at: "2021-04-19T07:05:36Z",
name: "my_project",
path: "my_project",
path_with_namespace: "namespace2/my_project",
project_id: 1,
owner_name: "John",
owner_email: "[email protected]",
owners: [name: "John", email: "[email protected]"],
project_visibility: "internal",
old_path_with_namespace: "old-path-with-namespace"



24
25
26
27
28
29
30
31
# File 'lib/gitlab/hook_data/project_builder.rb', line 24

def build(event)
  [
    event_data(event),
    timestamps_data,
    project_data,
    event_specific_project_data(event)
  ].reduce(:merge)
end