7e6f6e1603
Enables frozens string for the following: * lib/gitlab/conflict/**/*.rb * lib/gitlab/cross_project_access/**/*.rb * lib/gitlab/cycle_analytics/**/*.rb * lib/gitlab/data_builder/**/*.rb * lib/gitlab/database/**/*.rb * lib/gitlab/dependency_linker/**/*.rb * lib/gitlab/diff/**/*.rb * lib/gitlab/downtime_check/**/*.rb * lib/gitlab/email/**/*.rb * lib/gitlab/etag_caching/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
24 lines
541 B
Ruby
24 lines
541 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module DataBuilder
|
|
module WikiPage
|
|
extend self
|
|
|
|
def build(wiki_page, user, action)
|
|
wiki = wiki_page.wiki
|
|
|
|
{
|
|
object_kind: wiki_page.class.name.underscore,
|
|
user: user.hook_attrs,
|
|
project: wiki.project.hook_attrs,
|
|
wiki: wiki.hook_attrs,
|
|
object_attributes: wiki_page.hook_attrs.merge(
|
|
url: Gitlab::UrlBuilder.build(wiki_page),
|
|
action: action
|
|
)
|
|
}
|
|
end
|
|
end
|
|
end
|
|
end
|