2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
class ProjectHook < WebHook
|
2018-03-17 18:26:18 +05:30
|
|
|
include TriggerableHooks
|
2020-01-01 13:55:28 +05:30
|
|
|
include Presentable
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
triggerable_hooks [
|
|
|
|
:push_hooks,
|
|
|
|
:tag_push_hooks,
|
|
|
|
:issue_hooks,
|
|
|
|
:confidential_issue_hooks,
|
|
|
|
:note_hooks,
|
2018-04-05 14:03:07 +05:30
|
|
|
:confidential_note_hooks,
|
2018-03-17 18:26:18 +05:30
|
|
|
:merge_request_hooks,
|
|
|
|
:job_hooks,
|
|
|
|
:pipeline_hooks,
|
|
|
|
:wiki_page_hooks
|
|
|
|
]
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
belongs_to :project
|
|
|
|
validates :project, presence: true
|
2020-01-01 13:55:28 +05:30
|
|
|
|
|
|
|
def pluralized_name
|
2020-04-08 14:13:33 +05:30
|
|
|
_('Webhooks')
|
2020-01-01 13:55:28 +05:30
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
ProjectHook.prepend_if_ee('EE::ProjectHook')
|