gitlab-org--gitlab-foss/app/models/hooks/project_hook.rb
Douwe Maan 1fd83f972c Merge branch 'bvl-rename-build-events-to-job-events' into 'master'
Rename `build_events` to `job_events`

Closes #31620

See merge request !11287
2017-05-16 14:12:19 +02:00

11 lines
494 B
Ruby

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