debian-mirror-gitlab/app/graphql/subscriptions/notes/created.rb
2023-04-23 21:23:45 +05:30

20 lines
417 B
Ruby

# frozen_string_literal: true
module Subscriptions
module Notes
class Created < Base
payload_type ::Types::Notes::NoteType
def update(*args)
case object
when ResourceEvent
object.work_item_synthetic_system_note
when Array
object.first.work_item_synthetic_system_note(events: object)
else
object
end
end
end
end
end