summaryrefslogtreecommitdiff
path: root/app/graphql
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-30 18:09:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-30 18:09:08 +0000
commit861cc0c363283c359becb153d0f6e88393cd3e79 (patch)
treeb338ffd187d52d5ffdf7ae6ab08ccce0e45236a4 /app/graphql
parent0daaf2c2ba5a0537094a53e7f84386616dbcbff0 (diff)
downloadgitlab-ce-861cc0c363283c359becb153d0f6e88393cd3e79.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r--app/graphql/types/namespace/shared_runners_setting_enum.rb13
-rw-r--r--app/graphql/types/namespace_type.rb5
2 files changed, 18 insertions, 0 deletions
diff --git a/app/graphql/types/namespace/shared_runners_setting_enum.rb b/app/graphql/types/namespace/shared_runners_setting_enum.rb
new file mode 100644
index 00000000000..4773e414aeb
--- /dev/null
+++ b/app/graphql/types/namespace/shared_runners_setting_enum.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Types
+ class Namespace::SharedRunnersSettingEnum < BaseEnum
+ graphql_name 'SharedRunnersSetting'
+
+ ::Namespace::SHARED_RUNNERS_SETTINGS.each do |type|
+ value type.upcase,
+ description: "Sharing of runners is #{type.tr('_', ' ')}.",
+ value: type
+ end
+ end
+end
diff --git a/app/graphql/types/namespace_type.rb b/app/graphql/types/namespace_type.rb
index da5e4ae0642..4cc543f477a 100644
--- a/app/graphql/types/namespace_type.rb
+++ b/app/graphql/types/namespace_type.rb
@@ -42,6 +42,11 @@ module Types
null: true,
description: 'The package settings for the namespace.'
+ field :shared_runners_setting,
+ Types::Namespace::SharedRunnersSettingEnum,
+ null: true,
+ description: "Shared runners availability for the namespace and its descendants."
+
def root_storage_statistics
Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end