debian-mirror-gitlab/app/graphql/graphql_triggers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
2.4 KiB
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
module GraphqlTriggers
def self.issuable_assignees_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_assignees_updated, { issuable_id: issuable.to_gid }, issuable)
2021-06-08 01:23:25 +05:30
end
2022-01-26 12:08:38 +05:30
def self.issue_crm_contacts_updated(issue)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issue_crm_contacts_updated, { issuable_id: issue.to_gid }, issue)
2022-01-26 12:08:38 +05:30
end
2022-04-04 11:22:00 +05:30
def self.issuable_title_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_title_updated, { issuable_id: issuable.to_gid }, issuable)
2022-04-04 11:22:00 +05:30
end
2022-06-21 17:19:12 +05:30
2022-11-25 23:54:43 +05:30
def self.issuable_description_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_description_updated, { issuable_id: issuable.to_gid }, issuable)
2022-11-25 23:54:43 +05:30
end
2022-06-21 17:19:12 +05:30
def self.issuable_labels_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_labels_updated, { issuable_id: issuable.to_gid }, issuable)
2022-06-21 17:19:12 +05:30
end
2022-08-27 11:52:29 +05:30
def self.issuable_dates_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_dates_updated, { issuable_id: issuable.to_gid }, issuable)
2022-08-27 11:52:29 +05:30
end
2022-11-25 23:54:43 +05:30
2023-01-13 00:05:48 +05:30
def self.issuable_milestone_updated(issuable)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:issuable_milestone_updated, { issuable_id: issuable.to_gid }, issuable)
2023-01-13 00:05:48 +05:30
end
2023-04-23 21:23:45 +05:30
def self.work_item_note_created(work_item_gid, note_data)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:work_item_note_created, { noteable_id: work_item_gid }, note_data)
2023-04-23 21:23:45 +05:30
end
def self.work_item_note_deleted(work_item_gid, note_data)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:work_item_note_deleted, { noteable_id: work_item_gid }, note_data)
2023-04-23 21:23:45 +05:30
end
def self.work_item_note_updated(work_item_gid, note_data)
2023-06-20 00:43:36 +05:30
GitlabSchema.subscriptions.trigger(:work_item_note_updated, { noteable_id: work_item_gid }, note_data)
2023-04-23 21:23:45 +05:30
end
2022-11-25 23:54:43 +05:30
def self.merge_request_reviewers_updated(merge_request)
GitlabSchema.subscriptions.trigger(
2023-06-20 00:43:36 +05:30
:merge_request_reviewers_updated, { issuable_id: merge_request.to_gid }, merge_request
2022-11-25 23:54:43 +05:30
)
end
def self.merge_request_merge_status_updated(merge_request)
2023-06-20 00:43:36 +05:30
return unless Feature.enabled?(:realtime_mr_status_change, merge_request.project)
2022-11-25 23:54:43 +05:30
GitlabSchema.subscriptions.trigger(
2023-06-20 00:43:36 +05:30
:merge_request_merge_status_updated, { issuable_id: merge_request.to_gid }, merge_request
2022-11-25 23:54:43 +05:30
)
end
2023-03-04 22:38:38 +05:30
def self.merge_request_approval_state_updated(merge_request)
GitlabSchema.subscriptions.trigger(
2023-06-20 00:43:36 +05:30
:merge_request_approval_state_updated, { issuable_id: merge_request.to_gid }, merge_request
2023-03-04 22:38:38 +05:30
)
end
2021-06-08 01:23:25 +05:30
end
2022-10-11 01:57:18 +05:30
GraphqlTriggers.prepend_mod