blob: 2e4312f0045de3793ce442d41a37517efb99e9b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# frozen_string_literal: true
module Mutations
module Ci
module PipelineSchedule
class TakeOwnership < Base
graphql_name 'PipelineScheduleTakeOwnership'
authorize :take_ownership_pipeline_schedule
field :pipeline_schedule,
Types::Ci::PipelineScheduleType,
description: 'Updated pipeline schedule ownership.'
def resolve(id:)
schedule = authorized_find!(id: id)
service_response = ::Ci::PipelineSchedules::TakeOwnershipService.new(schedule, current_user).execute
{
pipeline_schedule: schedule,
errors: service_response.errors
}
end
end
end
end
end
|