2018-08-03 17:22:24 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2012-11-19 18:24:05 +00:00
|
|
|
class ProjectHook < WebHook
|
2017-12-04 10:18:54 +00:00
|
|
|
include TriggerableHooks
|
2019-12-17 15:08:15 +00:00
|
|
|
include Presentable
|
2017-07-20 15:12:06 +00:00
|
|
|
|
2017-12-04 14:45:47 +00:00
|
|
|
triggerable_hooks [
|
2017-12-04 10:18:54 +00:00
|
|
|
:push_hooks,
|
|
|
|
:tag_push_hooks,
|
|
|
|
:issue_hooks,
|
|
|
|
:confidential_issue_hooks,
|
|
|
|
:note_hooks,
|
2018-04-03 11:00:33 +00:00
|
|
|
:confidential_note_hooks,
|
2017-12-04 10:18:54 +00:00
|
|
|
:merge_request_hooks,
|
|
|
|
:job_hooks,
|
|
|
|
:pipeline_hooks,
|
|
|
|
:wiki_page_hooks
|
|
|
|
]
|
2013-12-02 19:38:32 +00:00
|
|
|
|
2017-07-20 15:12:06 +00:00
|
|
|
belongs_to :project
|
|
|
|
validates :project, presence: true
|
2019-12-16 09:08:10 +00:00
|
|
|
|
|
|
|
def pluralized_name
|
2020-02-24 18:09:05 +00:00
|
|
|
_('Webhooks')
|
2019-12-16 09:08:10 +00:00
|
|
|
end
|
2012-11-19 18:24:05 +00:00
|
|
|
end
|
2019-09-13 13:26:31 +00:00
|
|
|
|
|
|
|
ProjectHook.prepend_if_ee('EE::ProjectHook')
|