summaryrefslogtreecommitdiff
path: root/app/graphql
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 03:09:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 03:09:23 +0000
commitf098e6d3d2c8eaaec0a228c8a3ae01f770e15dd2 (patch)
tree611a38154ba90341f6c6935a51cf7962f5896790 /app/graphql
parent697d1c4e06d1c232ca8b21805cc889a0991702ab (diff)
downloadgitlab-ce-f098e6d3d2c8eaaec0a228c8a3ae01f770e15dd2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r--app/graphql/types/base_field.rb1
-rw-r--r--app/graphql/types/commit_type.rb2
-rw-r--r--app/graphql/types/grafana_integration_type.rb2
-rw-r--r--app/graphql/types/merge_request_type.rb2
-rw-r--r--app/graphql/types/project_type.rb6
5 files changed, 7 insertions, 6 deletions
diff --git a/app/graphql/types/base_field.rb b/app/graphql/types/base_field.rb
index 7e9d6392705..c8ec4b3f897 100644
--- a/app/graphql/types/base_field.rb
+++ b/app/graphql/types/base_field.rb
@@ -65,6 +65,7 @@ module Types
raise ArgumentError, 'Please provide a `milestone` within `deprecated`' unless milestone
raise ArgumentError, 'Please provide a `reason` within `deprecated`' unless reason
+ raise ArgumentError, '`milestone` must be a `String`' unless milestone.is_a?(String)
deprecated_in = "Deprecated in #{milestone}"
kwargs[:deprecation_reason] = "#{reason}. #{deprecated_in}"
diff --git a/app/graphql/types/commit_type.rb b/app/graphql/types/commit_type.rb
index 437da3bb585..aaf2dfd8488 100644
--- a/app/graphql/types/commit_type.rb
+++ b/app/graphql/types/commit_type.rb
@@ -44,7 +44,7 @@ module Types
field :latest_pipeline,
type: Types::Ci::PipelineType,
null: true,
- deprecated: { reason: 'Use `pipelines`', milestone: 12.5 },
+ deprecated: { reason: 'Use `pipelines`', milestone: '12.5' },
description: 'Latest pipeline of the commit',
resolver: Resolvers::CommitPipelinesResolver.last
end
diff --git a/app/graphql/types/grafana_integration_type.rb b/app/graphql/types/grafana_integration_type.rb
index 71018f6ce0a..c0582b266ab 100644
--- a/app/graphql/types/grafana_integration_type.rb
+++ b/app/graphql/types/grafana_integration_type.rb
@@ -18,7 +18,7 @@ module Types
description: 'Timestamp of the issue\'s last activity'
field :token, GraphQL::STRING_TYPE, null: false,
- deprecated: { reason: 'Plain text token has been masked for security reasons', milestone: 12.7 },
+ deprecated: { reason: 'Plain text token has been masked for security reasons', milestone: '12.7' },
description: 'API token for the Grafana integration'
def token
diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb
index 8cb439cb465..8f6b742a93c 100644
--- a/app/graphql/types/merge_request_type.rb
+++ b/app/graphql/types/merge_request_type.rb
@@ -75,7 +75,7 @@ module Types
field :rebase_in_progress, GraphQL::BOOLEAN_TYPE, method: :rebase_in_progress?, null: false, calls_gitaly: true,
description: 'Indicates if there is a rebase currently in progress for the merge request'
field :merge_commit_message, GraphQL::STRING_TYPE, method: :default_merge_commit_message, null: true,
- deprecated: { reason: 'Use `defaultMergeCommitMessage`', milestone: 11.8 },
+ deprecated: { reason: 'Use `defaultMergeCommitMessage`', milestone: '11.8' },
description: 'Default merge commit message of the merge request'
field :default_merge_commit_message, GraphQL::STRING_TYPE, null: true,
description: 'Default merge commit message of the merge request'
diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb
index b52266bc477..d82feffe441 100644
--- a/app/graphql/types/project_type.rb
+++ b/app/graphql/types/project_type.rb
@@ -54,7 +54,7 @@ module Types
field :container_registry_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if the project stores Docker container images in a container registry'
field :shared_runners_enabled, GraphQL::BOOLEAN_TYPE, null: true,
- description: 'Indicates if shared runners are enabled on the project'
+ description: 'Indicates if Shared Runners are enabled for the project'
field :lfs_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if the project has Large File Storage (LFS) enabled'
field :merge_requests_ff_only_enabled, GraphQL::BOOLEAN_TYPE, null: true,
@@ -68,14 +68,14 @@ module Types
%i[issues merge_requests wiki snippets].each do |feature|
field "#{feature}_enabled", GraphQL::BOOLEAN_TYPE, null: true,
- description: "(deprecated) Does this project have #{feature} enabled?. Use `#{feature}_access_level` instead",
+ description: "Indicates if #{feature.to_s.titleize.pluralize} are enabled for the current user",
resolve: -> (project, args, ctx) do
project.feature_available?(feature, ctx[:current_user])
end
end
field :jobs_enabled, GraphQL::BOOLEAN_TYPE, null: true,
- description: '(deprecated) Enable jobs for this project. Use `builds_access_level` instead',
+ description: 'Indicates if CI/CD pipeline jobs are enabled for the current user',
resolve: -> (project, args, ctx) do
project.feature_available?(:builds, ctx[:current_user])
end