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/types/ci_configuration')
-rw-r--r--app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb25
-rw-r--r--app/graphql/types/ci_configuration/sast/entity_type.rb34
-rw-r--r--app/graphql/types/ci_configuration/sast/options_entity_type.rb19
-rw-r--r--app/graphql/types/ci_configuration/sast/type.rb22
4 files changed, 100 insertions, 0 deletions
diff --git a/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb
new file mode 100644
index 00000000000..ccd1c7dd0eb
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class AnalyzersEntityType < BaseObject
+ graphql_name 'SastCiConfigurationAnalyzersEntity'
+ description 'Represents an analyzer entity in SAST CI configuration'
+
+ field :name, GraphQL::STRING_TYPE, null: true,
+ description: 'Name of the analyzer.'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Analyzer label used in the config UI.'
+
+ field :enabled, GraphQL::BOOLEAN_TYPE, null: true,
+ description: 'Indicates whether an analyzer is enabled.'
+
+ field :description, GraphQL::STRING_TYPE, null: true,
+ description: 'Analyzer description that is displayed on the form.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/entity_type.rb b/app/graphql/types/ci_configuration/sast/entity_type.rb
new file mode 100644
index 00000000000..b61b582ad20
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/entity_type.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class EntityType < BaseObject
+ graphql_name 'SastCiConfigurationEntity'
+ description 'Represents an entity in SAST CI configuration'
+
+ field :field, GraphQL::STRING_TYPE, null: true,
+ description: 'CI keyword of entity.'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Label for entity used in the form.'
+
+ field :type, GraphQL::STRING_TYPE, null: true,
+ description: 'Type of the field value.'
+
+ field :options, ::Types::CiConfiguration::Sast::OptionsEntityType.connection_type, null: true,
+ description: 'Different possible values of the field.'
+
+ field :default_value, GraphQL::STRING_TYPE, null: true,
+ description: 'Default value that is used if value is empty.'
+
+ field :description, GraphQL::STRING_TYPE, null: true,
+ description: 'Entity description that is displayed on the form.'
+
+ field :value, GraphQL::STRING_TYPE, null: true,
+ description: 'Current value of the entity.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/options_entity_type.rb b/app/graphql/types/ci_configuration/sast/options_entity_type.rb
new file mode 100644
index 00000000000..86d104a7fda
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/options_entity_type.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class OptionsEntityType < BaseObject
+ graphql_name 'SastCiConfigurationOptionsEntity'
+ description 'Represents an entity for options in SAST CI configuration'
+
+ field :label, GraphQL::STRING_TYPE, null: true,
+ description: 'Label of option entity.'
+
+ field :value, GraphQL::STRING_TYPE, null: true,
+ description: 'Value of option entity.'
+ end
+ end
+ end
+end
diff --git a/app/graphql/types/ci_configuration/sast/type.rb b/app/graphql/types/ci_configuration/sast/type.rb
new file mode 100644
index 00000000000..35d11584ac7
--- /dev/null
+++ b/app/graphql/types/ci_configuration/sast/type.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module Types
+ module CiConfiguration
+ module Sast
+ # rubocop: disable Graphql/AuthorizeTypes
+ class Type < BaseObject
+ graphql_name 'SastCiConfiguration'
+ description 'Represents a CI configuration of SAST'
+
+ field :global, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true,
+ description: 'List of global entities related to SAST configuration.'
+
+ field :pipeline, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true,
+ description: 'List of pipeline entities related to SAST configuration.'
+
+ field :analyzers, ::Types::CiConfiguration::Sast::AnalyzersEntityType.connection_type, null: true,
+ description: 'List of analyzers entities attached to SAST configuration.'
+ end
+ end
+ end
+end