Commit 73bdd0b3 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'lm-add-paid-boolean-to-gql' into 'master'

Adds crossProjectPipelineAvailable to NamespaceType

See merge request gitlab-org/gitlab!80381
parents d40d831b bf83faf5
...@@ -18,6 +18,10 @@ module Types ...@@ -18,6 +18,10 @@ module Types
field :full_path, GraphQL::Types::ID, null: false, field :full_path, GraphQL::Types::ID, null: false,
description: 'Full path of the namespace.' description: 'Full path of the namespace.'
field :cross_project_pipeline_available, GraphQL::Types::Boolean, null: false,
resolver_method: :cross_project_pipeline_available?,
description: 'Indicates if the cross_project_pipeline feature is available for the namespace.'
field :description, GraphQL::Types::String, null: true, field :description, GraphQL::Types::String, null: true,
description: 'Description of the namespace.' description: 'Description of the namespace.'
...@@ -48,6 +52,10 @@ module Types ...@@ -48,6 +52,10 @@ module Types
markdown_field :description_html, null: true markdown_field :description_html, null: true
def cross_project_pipeline_available?
object.licensed_feature_available?(:cross_project_pipelines)
end
def root_storage_statistics def root_storage_statistics
Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end end
......
...@@ -10998,6 +10998,7 @@ four standard [pagination arguments](#connection-pagination-arguments): ...@@ -10998,6 +10998,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="groupcontacts"></a>`contacts` | [`CustomerRelationsContactConnection`](#customerrelationscontactconnection) | Find contacts of this group. (see [Connections](#connections)) | | <a id="groupcontacts"></a>`contacts` | [`CustomerRelationsContactConnection`](#customerrelationscontactconnection) | Find contacts of this group. (see [Connections](#connections)) |
| <a id="groupcontainerrepositoriescount"></a>`containerRepositoriesCount` | [`Int!`](#int) | Number of container repositories in the group. | | <a id="groupcontainerrepositoriescount"></a>`containerRepositoriesCount` | [`Int!`](#int) | Number of container repositories in the group. |
| <a id="groupcontainslockedprojects"></a>`containsLockedProjects` | [`Boolean!`](#boolean) | Includes at least one project where the repository size exceeds the limit. | | <a id="groupcontainslockedprojects"></a>`containsLockedProjects` | [`Boolean!`](#boolean) | Includes at least one project where the repository size exceeds the limit. |
| <a id="groupcrossprojectpipelineavailable"></a>`crossProjectPipelineAvailable` | [`Boolean!`](#boolean) | Indicates if the cross_project_pipeline feature is available for the namespace. |
| <a id="groupcustomemoji"></a>`customEmoji` | [`CustomEmojiConnection`](#customemojiconnection) | Custom emoji within this namespace. Available only when feature flag `custom_emoji` is enabled. This flag is disabled by default, because the feature is experimental and is subject to change without notice. (see [Connections](#connections)) | | <a id="groupcustomemoji"></a>`customEmoji` | [`CustomEmojiConnection`](#customemojiconnection) | Custom emoji within this namespace. Available only when feature flag `custom_emoji` is enabled. This flag is disabled by default, because the feature is experimental and is subject to change without notice. (see [Connections](#connections)) |
| <a id="groupdependencyproxyblobcount"></a>`dependencyProxyBlobCount` | [`Int!`](#int) | Number of dependency proxy blobs cached in the group. | | <a id="groupdependencyproxyblobcount"></a>`dependencyProxyBlobCount` | [`Int!`](#int) | Number of dependency proxy blobs cached in the group. |
| <a id="groupdependencyproxyblobs"></a>`dependencyProxyBlobs` | [`DependencyProxyBlobConnection`](#dependencyproxyblobconnection) | Dependency Proxy blobs. (see [Connections](#connections)) | | <a id="groupdependencyproxyblobs"></a>`dependencyProxyBlobs` | [`DependencyProxyBlobConnection`](#dependencyproxyblobconnection) | Dependency Proxy blobs. (see [Connections](#connections)) |
...@@ -12903,6 +12904,7 @@ Contains statistics about a milestone. ...@@ -12903,6 +12904,7 @@ Contains statistics about a milestone.
| <a id="namespaceactualrepositorysizelimit"></a>`actualRepositorySizeLimit` | [`Float`](#float) | Size limit for repositories in the namespace in bytes. | | <a id="namespaceactualrepositorysizelimit"></a>`actualRepositorySizeLimit` | [`Float`](#float) | Size limit for repositories in the namespace in bytes. |
| <a id="namespaceadditionalpurchasedstoragesize"></a>`additionalPurchasedStorageSize` | [`Float`](#float) | Additional storage purchased for the root namespace in bytes. | | <a id="namespaceadditionalpurchasedstoragesize"></a>`additionalPurchasedStorageSize` | [`Float`](#float) | Additional storage purchased for the root namespace in bytes. |
| <a id="namespacecontainslockedprojects"></a>`containsLockedProjects` | [`Boolean!`](#boolean) | Includes at least one project where the repository size exceeds the limit. | | <a id="namespacecontainslockedprojects"></a>`containsLockedProjects` | [`Boolean!`](#boolean) | Includes at least one project where the repository size exceeds the limit. |
| <a id="namespacecrossprojectpipelineavailable"></a>`crossProjectPipelineAvailable` | [`Boolean!`](#boolean) | Indicates if the cross_project_pipeline feature is available for the namespace. |
| <a id="namespacedescription"></a>`description` | [`String`](#string) | Description of the namespace. | | <a id="namespacedescription"></a>`description` | [`String`](#string) | Description of the namespace. |
| <a id="namespacedescriptionhtml"></a>`descriptionHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `description`. | | <a id="namespacedescriptionhtml"></a>`descriptionHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `description`. |
| <a id="namespacefullname"></a>`fullName` | [`String!`](#string) | Full name of the namespace. | | <a id="namespacefullname"></a>`fullName` | [`String!`](#string) | Full name of the namespace. |
...@@ -31,7 +31,8 @@ RSpec.describe 'Query' do ...@@ -31,7 +31,8 @@ RSpec.describe 'Query' do
it 'fetches the expected data' do it 'fetches the expected data' do
expect(query_result).to include( expect(query_result).to include(
'fullPath' => target_namespace.full_path, 'fullPath' => target_namespace.full_path,
'name' => target_namespace.name 'name' => target_namespace.name,
'crossProjectPipelineAvailable' => target_namespace.licensed_feature_available?(:cross_project_pipeline)
) )
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment