Commit 070500cd authored by Luke Duncalfe's avatar Luke Duncalfe

Remove (deprecated) strings from ProjectType

ProjectType had (deprecated) added to the description of some of its
fields in d1451e7b. These were added because the same properties had
been deprecated in the REST Projects API in favor of properties called
`{x}_access_level`
https://gitlab.com/gitlab-org/gitlab/-/issues/211620#note_315174858.

As the GraphQL ProjectType does not have such fields, the fields that
had "(deprecated)" added to their descriptions were never actually
deprecated.

This MR removes those strings, and also makes the descriptions more
consistent according to
https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#description-styleguide:

> Descriptions of GraphQL::BOOLEAN_TYPE fields should answer the
> question: “What does this field do?”. Example: 'Indicates project has
> a Git repository'.

https://gitlab.com/gitlab-org/gitlab/-/issues/211620
parent 35b18fe2
......@@ -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
......
---
title: Cleanup the descriptions of some fields of GraphQL ProjectType
merge_request: 28735
author:
type: changed
......@@ -6093,7 +6093,7 @@ type Project {
): IssueConnection
"""
(deprecated) Does this project have issues enabled?. Use `issues_access_level` instead
Indicates if Issues are enabled for the current user
"""
issuesEnabled: Boolean
......@@ -6128,7 +6128,7 @@ type Project {
): JiraImportConnection
"""
(deprecated) Enable jobs for this project. Use `builds_access_level` instead
Indicates if CI/CD pipeline jobs are enabled for the current user
"""
jobsEnabled: Boolean
......@@ -6193,7 +6193,7 @@ type Project {
): MergeRequestConnection
"""
(deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead
Indicates if Merge Requests are enabled for the current user
"""
mergeRequestsEnabled: Boolean
......@@ -6406,7 +6406,7 @@ type Project {
serviceDeskEnabled: Boolean
"""
Indicates if shared runners are enabled on the project
Indicates if Shared Runners are enabled for the project
"""
sharedRunnersEnabled: Boolean
......@@ -6446,7 +6446,7 @@ type Project {
): SnippetConnection
"""
(deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead
Indicates if Snippets are enabled for the current user
"""
snippetsEnabled: Boolean
......@@ -6542,7 +6542,7 @@ type Project {
webUrl: String
"""
(deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead
Indicates if Wikis are enabled for the current user
"""
wikiEnabled: Boolean
}
......
......@@ -18344,7 +18344,7 @@
},
{
"name": "issuesEnabled",
"description": "(deprecated) Does this project have issues enabled?. Use `issues_access_level` instead",
"description": "Indicates if Issues are enabled for the current user",
"args": [
],
......@@ -18425,7 +18425,7 @@
},
{
"name": "jobsEnabled",
"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",
"args": [
],
......@@ -18589,7 +18589,7 @@
},
{
"name": "mergeRequestsEnabled",
"description": "(deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead",
"description": "Indicates if Merge Requests are enabled for the current user",
"args": [
],
......@@ -19125,7 +19125,7 @@
},
{
"name": "sharedRunnersEnabled",
"description": "Indicates if shared runners are enabled on the project",
"description": "Indicates if Shared Runners are enabled for the project",
"args": [
],
......@@ -19220,7 +19220,7 @@
},
{
"name": "snippetsEnabled",
"description": "(deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead",
"description": "Indicates if Snippets are enabled for the current user",
"args": [
],
......@@ -19493,7 +19493,7 @@
},
{
"name": "wikiEnabled",
"description": "(deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead",
"description": "Indicates if Wikis are enabled for the current user",
"args": [
],
......
......@@ -901,13 +901,13 @@ Information about pagination in a connection.
| `id` | ID! | ID of the project |
| `importStatus` | String | Status of import background job of the project |
| `issue` | Issue | A single issue of the project |
| `issuesEnabled` | Boolean | (deprecated) Does this project have issues enabled?. Use `issues_access_level` instead |
| `issuesEnabled` | Boolean | Indicates if Issues are enabled for the current user |
| `jiraImportStatus` | String | Status of Jira import background job of the project |
| `jobsEnabled` | Boolean | (deprecated) Enable jobs for this project. Use `builds_access_level` instead |
| `jobsEnabled` | Boolean | Indicates if CI/CD pipeline jobs are enabled for the current user |
| `lastActivityAt` | Time | Timestamp of the project last activity |
| `lfsEnabled` | Boolean | Indicates if the project has Large File Storage (LFS) enabled |
| `mergeRequest` | MergeRequest | A single merge request of the project |
| `mergeRequestsEnabled` | Boolean | (deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead |
| `mergeRequestsEnabled` | Boolean | Indicates if Merge Requests are enabled for the current user |
| `mergeRequestsFfOnlyEnabled` | Boolean | Indicates if no merge commits should be created and all merges should instead be fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. |
| `name` | String! | Name of the project (without namespace) |
| `nameWithNamespace` | String! | Full name of the project with its namespace |
......@@ -927,8 +927,8 @@ Information about pagination in a connection.
| `sentryErrors` | SentryErrorCollection | Paginated collection of Sentry errors on the project |
| `serviceDeskAddress` | String | E-mail address of the service desk. |
| `serviceDeskEnabled` | Boolean | Indicates if the project has service desk enabled. |
| `sharedRunnersEnabled` | Boolean | Indicates if shared runners are enabled on the project |
| `snippetsEnabled` | Boolean | (deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead |
| `sharedRunnersEnabled` | Boolean | Indicates if Shared Runners are enabled for the project |
| `snippetsEnabled` | Boolean | Indicates if Snippets are enabled for the current user |
| `sshUrlToRepo` | String | URL to connect to the project via SSH |
| `starCount` | Int! | Number of times the project has been starred |
| `statistics` | ProjectStatistics | Statistics of the project |
......@@ -938,7 +938,7 @@ Information about pagination in a connection.
| `visibility` | String | Visibility of the project |
| `vulnerabilitySeveritiesCount` | VulnerabilitySeveritiesCount | Counts for each severity of vulnerability of the project. Available only when feature flag `first_class_vulnerabilities` is enabled |
| `webUrl` | String | Web URL of the project |
| `wikiEnabled` | Boolean | (deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead |
| `wikiEnabled` | Boolean | Indicates if Wikis are enabled for the current user |
## ProjectPermissions
......
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