summaryrefslogtreecommitdiff
path: root/app/models/hooks/project_hook.rb
blob: ee6165fd32d0703f7c1f5ea6e81cd9d5acb110a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
class ProjectHook < WebHook
  belongs_to :project

  scope :issue_hooks, -> { where(issues_events: true) }
  scope :confidential_issue_hooks, -> { where(confidential_issues_events: true) }
  scope :note_hooks, -> { where(note_events: true) }
  scope :merge_request_hooks, -> { where(merge_requests_events: true) }
  scope :job_hooks, -> { where(job_events: true) }
  scope :pipeline_hooks, -> { where(pipeline_events: true) }
  scope :wiki_page_hooks, ->  { where(wiki_page_events: true) }
end