Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/incident_management/timeline_event_tag/create.rb')
-rw-r--r--app/graphql/mutations/incident_management/timeline_event_tag/create.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/graphql/mutations/incident_management/timeline_event_tag/create.rb b/app/graphql/mutations/incident_management/timeline_event_tag/create.rb
new file mode 100644
index 00000000000..14b1d288365
--- /dev/null
+++ b/app/graphql/mutations/incident_management/timeline_event_tag/create.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+module Mutations
+ module IncidentManagement
+ module TimelineEventTag
+ class Create < Base
+ graphql_name 'TimelineEventTagCreate'
+
+ include FindsProject
+
+ argument :project_path, GraphQL::Types::ID,
+ required: true,
+ description: 'Project to create the timeline event tag in.'
+
+ argument :name, GraphQL::Types::String,
+ required: true,
+ description: 'Name of the tag.'
+
+ def resolve(project_path:, **args)
+ project = authorized_find!(project_path)
+
+ response ::IncidentManagement::TimelineEventTags::CreateService.new(
+ project, current_user, args
+ ).execute
+ end
+ end
+ end
+ end
+end