diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index 64316fcb2ac2ca686166139b4398412553270e78..becd192cbec68e11287230bb0a1188ec6d58c1b2 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -137,22 +137,7 @@ Layout/LineLength: - 'app/graphql/types/issue_sort_enum.rb' - 'app/graphql/types/issue_type.rb' - 'app/graphql/types/member_interface.rb' - - 'app/graphql/types/merge_request_type.rb' - - 'app/graphql/types/milestone_sort_enum.rb' - - 'app/graphql/types/milestone_type.rb' - - 'app/graphql/types/namespace/package_settings_type.rb' - 'app/graphql/types/notes/diff_position_input_type.rb' - - 'app/graphql/types/notes/noteable_interface.rb' - - 'app/graphql/types/packages/composer/metadatum_type.rb' - - 'app/graphql/types/packages/conan/file_metadatum_type.rb' - - 'app/graphql/types/packages/helm/dependency_type.rb' - - 'app/graphql/types/packages/helm/metadata_type.rb' - - 'app/graphql/types/packages/nuget/dependency_link_metadatum_type.rb' - - 'app/graphql/types/packages/package_dependency_link_type.rb' - - 'app/graphql/types/packages/package_details_type.rb' - - 'app/graphql/types/packages/package_type_enum.rb' - - 'app/graphql/types/packages/pypi/metadatum_type.rb' - - 'app/graphql/types/project_type.rb' - 'app/graphql/types/query_type.rb' - 'app/graphql/types/repository/blob_type.rb' - 'app/graphql/types/repository_type.rb' diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb index dacdb9eee3e2e08623b2f73394d4c5e837fe7530..67b6a254bc58f9c47bc973058ccd8cef151467c8 100644 --- a/app/graphql/types/merge_request_type.rb +++ b/app/graphql/types/merge_request_type.rb @@ -119,9 +119,9 @@ class MergeRequestType < BaseObject alpha: { milestone: '16.5' }, calls_gitaly: true - field :mergeable_discussions_state, GraphQL::Types::Boolean, null: true, - calls_gitaly: true, - description: 'Indicates if all discussions in the merge request have been resolved, allowing the merge request to be merged.' + field :mergeable_discussions_state, GraphQL::Types::Boolean, null: true, calls_gitaly: true, + description: 'Indicates if all discussions in the merge request have been resolved, ' \ + 'allowing the merge request to be merged.' field :rebase_commit_sha, GraphQL::Types::String, null: true, description: 'Rebase commit SHA of the merge request.' field :rebase_in_progress, GraphQL::Types::Boolean, method: :rebase_in_progress?, null: false, calls_gitaly: true, @@ -163,7 +163,8 @@ class MergeRequestType < BaseObject description: 'Pipeline running on the branch HEAD of the merge request.' field :pipelines, null: true, - description: 'Pipelines for the merge request. Note: for performance reasons, no more than the most recent 500 pipelines will be returned.', + description: 'Pipelines for the merge request. Note: for performance reasons, ' \ + 'no more than the most recent 500 pipelines will be returned.', resolver: Resolvers::MergeRequestPipelinesResolver field :assignees, @@ -193,8 +194,12 @@ class MergeRequestType < BaseObject description: 'Indicates if the merge request has conflicts.' field :milestone, Types::MilestoneType, null: true, description: 'Milestone of the merge request.' - field :participants, Types::MergeRequests::ParticipantType.connection_type, null: true, complexity: 15, - description: 'Participants in the merge request. This includes the author, assignees, reviewers, and users mentioned in notes.', + field :participants, + Types::MergeRequests::ParticipantType.connection_type, + null: true, + complexity: 15, + description: 'Participants in the merge request. This includes the author, ' \ + 'assignees, reviewers, and users mentioned in notes.', resolver: Resolvers::Users::ParticipantsResolver field :reference, GraphQL::Types::String, null: false, method: :to_reference, description: 'Internal reference of the merge request. Returned in shortened format by default.' do @@ -240,11 +245,22 @@ class MergeRequestType < BaseObject description: 'User who merged this merge request or set it to auto-merge.' field :mergeable, GraphQL::Types::Boolean, null: false, method: :mergeable?, calls_gitaly: true, description: 'Indicates if the merge request is mergeable.' - field :security_auto_fix, GraphQL::Types::Boolean, null: true, - description: 'Indicates if the merge request is created by @GitLab-Security-Bot.', deprecated: { reason: 'Security Auto Fix experiment feature was removed. It was always hidden behind `security_auto_fix` feature flag', milestone: '16.11' } + field :security_auto_fix, + GraphQL::Types::Boolean, + null: true, + description: 'Indicates if the merge request is created by @GitLab-Security-Bot.', + deprecated: { + reason: 'Security Auto Fix experiment feature was removed. ' \ + 'It was always hidden behind `security_auto_fix` feature flag', + milestone: '16.11' + } field :squash, GraphQL::Types::Boolean, null: false, - description: 'Indicates if the merge request is set to be squashed when merged. [Project settings](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html#configure-squash-options-for-a-project) may override this value. Use `squash_on_merge` instead to take project squash options into account.' + description: <<~HEREDOC.squish + Indicates if the merge request is set to be squashed when merged. + [Project settings](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html#configure-squash-options-for-a-project) + may override this value. Use `squash_on_merge` instead to take project squash options into account. + HEREDOC field :squash_on_merge, GraphQL::Types::Boolean, null: false, method: :squash_on_merge?, description: 'Indicates if the merge request will be squashed when merged.' field :timelogs, Types::TimelogType.connection_type, null: false, @@ -296,7 +312,11 @@ def user_notes_count def user_discussions_count BatchLoader::GraphQL.for(object.id).batch(key: :merge_request_user_discussions_count) do |ids, loader, args| - counts = Note.count_for_collection(ids, 'MergeRequest', 'COUNT(DISTINCT discussion_id) as count').index_by(&:noteable_id) + counts = Note.count_for_collection( + ids, + 'MergeRequest', + 'COUNT(DISTINCT discussion_id) as count' + ).index_by(&:noteable_id) ids.each do |id| loader.call(id, counts[id]&.count || 0) diff --git a/app/graphql/types/milestone_sort_enum.rb b/app/graphql/types/milestone_sort_enum.rb index 9f7dedb4c4ce370f7f76de6a0409502ae901ff82..e70bd07f7914b1486a2db84423d5864f0abf2e03 100644 --- a/app/graphql/types/milestone_sort_enum.rb +++ b/app/graphql/types/milestone_sort_enum.rb @@ -7,7 +7,13 @@ class MilestoneSortEnum < SortEnum value 'DUE_DATE_ASC', 'Milestone due date by ascending order.', value: :due_date_asc value 'DUE_DATE_DESC', 'Milestone due date by descending order.', value: :due_date_desc - value 'EXPIRED_LAST_DUE_DATE_ASC', 'Group milestones in this order: non-expired milestones with due dates, non-expired milestones without due dates and expired milestones then sort by due date in ascending order.', value: :expired_last_due_date_asc - value 'EXPIRED_LAST_DUE_DATE_DESC', 'Group milestones in this order: non-expired milestones with due dates, non-expired milestones without due dates and expired milestones then sort by due date in descending order.', value: :expired_last_due_date_desc + value 'EXPIRED_LAST_DUE_DATE_ASC', + 'Group milestones in this order: non-expired milestones with due dates, non-expired milestones ' \ + 'without due dates and expired milestones then sort by due date in ascending order.', + value: :expired_last_due_date_asc + value 'EXPIRED_LAST_DUE_DATE_DESC', + 'Group milestones in this order: non-expired milestones with due dates, non-expired milestones ' \ + 'without due dates and expired milestones then sort by due date in descending order.', + value: :expired_last_due_date_desc end end diff --git a/app/graphql/types/milestone_type.rb b/app/graphql/types/milestone_type.rb index 36c7ee286e6a9f5ec53be2519161b9eed93d0f45..68a9299b38719815297a83045c74e19f17d98336 100644 --- a/app/graphql/types/milestone_type.rb +++ b/app/graphql/types/milestone_type.rb @@ -27,10 +27,12 @@ class MilestoneType < BaseObject description: 'State of the milestone.' field :expired, GraphQL::Types::Boolean, null: false, - description: 'Expired state of the milestone (a milestone is expired when the due date is past the current date). Defaults to `false` when due date has not been set.' + description: 'Expired state of the milestone (a milestone is expired when the due date is past the current ' \ + 'date). Defaults to `false` when due date has not been set.' field :upcoming, GraphQL::Types::Boolean, null: false, - description: 'Upcoming state of the milestone (a milestone is upcoming when the start date is in the future). Defaults to `false` when start date has not been set.' + description: 'Upcoming state of the milestone (a milestone is upcoming when the start date is in the future). ' \ + 'Defaults to `false` when start date has not been set.' field :web_path, GraphQL::Types::String, null: false, method: :milestone_path, description: 'Web path of the milestone.' diff --git a/app/graphql/types/namespace/package_settings_type.rb b/app/graphql/types/namespace/package_settings_type.rb index 621cb0910193f4a5b2212b44b640aa9cd75172f1..9a3ebc6d49e89a5b550acd44ee80e8651a2221aa 100644 --- a/app/graphql/types/namespace/package_settings_type.rb +++ b/app/graphql/types/namespace/package_settings_type.rb @@ -10,13 +10,15 @@ class Namespace::PackageSettingsType < BaseObject field :generic_duplicate_exception_regex, Types::UntrustedRegexp, null: true, - description: 'When generic_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.' + description: 'When generic_duplicates_allowed is false, you can publish duplicate packages with names that ' \ + 'match this regex. Otherwise, this setting has no effect.' field :generic_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate generic packages are allowed for this namespace.' field :maven_duplicate_exception_regex, Types::UntrustedRegexp, null: true, - description: 'When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.' + description: 'When maven_duplicates_allowed is false, you can publish duplicate packages with names that ' \ + 'match this regex. Otherwise, this setting has no effect.' field :maven_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate Maven packages are allowed for this namespace.' @@ -28,7 +30,8 @@ class Namespace::PackageSettingsType < BaseObject description: 'Indicates whether npm package forwarding is allowed for this namespace.' field :nuget_duplicate_exception_regex, Types::UntrustedRegexp, null: true, - description: 'When nuget_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect. ' + description: 'When nuget_duplicates_allowed is false, you can publish duplicate packages with names that ' \ + 'match this regex. Otherwise, this setting has no effect. ' field :nuget_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate NuGet packages are allowed for this namespace.' @@ -37,7 +40,8 @@ class Namespace::PackageSettingsType < BaseObject description: 'Indicates whether PyPI package forwarding is allowed for this namespace.' field :terraform_module_duplicate_exception_regex, Types::UntrustedRegexp, null: true, - description: 'When terraform_module_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.' + description: 'When terraform_module_duplicates_allowed is false, you can publish duplicate packages with ' \ + 'names that match this regex. Otherwise, this setting has no effect.' field :terraform_module_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate Terraform packages are allowed for this namespace.' diff --git a/app/graphql/types/notes/noteable_interface.rb b/app/graphql/types/notes/noteable_interface.rb index 3879f7be08fc59e814fd99c909d911ca36bda9f8..e04da811b381ac6fd24509b13fe00e0df3cc3e59 100644 --- a/app/graphql/types/notes/noteable_interface.rb +++ b/app/graphql/types/notes/noteable_interface.rb @@ -5,8 +5,10 @@ module Notes module NoteableInterface include Types::BaseInterface - field :notes, resolver: Resolvers::Noteable::NotesResolver, null: false, description: "All notes on this noteable." - field :discussions, Types::Notes::DiscussionType.connection_type, null: false, description: "All discussions on this noteable." + field :notes, resolver: Resolvers::Noteable::NotesResolver, null: false, + description: "All notes on this noteable." + field :discussions, Types::Notes::DiscussionType.connection_type, null: false, + description: "All discussions on this noteable." field :commenters, Types::UserType.connection_type, null: false, description: "All commenters on this noteable." def self.resolve_type(object, context) diff --git a/app/graphql/types/packages/composer/metadatum_type.rb b/app/graphql/types/packages/composer/metadatum_type.rb index d28ee87b87899e4e2cae074782387765e506f000..6da37617942d14275dcd8fc8ed7992069b27ff33 100644 --- a/app/graphql/types/packages/composer/metadatum_type.rb +++ b/app/graphql/types/packages/composer/metadatum_type.rb @@ -9,7 +9,8 @@ class MetadatumType < BaseObject authorize :read_package - field :composer_json, Types::Packages::Composer::JsonType, null: false, description: 'Data of the Composer JSON file.' + field :composer_json, Types::Packages::Composer::JsonType, null: false, + description: 'Data of the Composer JSON file.' field :target_sha, GraphQL::Types::String, null: false, description: 'Target SHA of the package.' end end diff --git a/app/graphql/types/packages/conan/file_metadatum_type.rb b/app/graphql/types/packages/conan/file_metadatum_type.rb index 3f6c4837796b60cb4f837183f10345ff8f07b397..fcc538ab24545c84c268a48e70dc31b1840eeefe 100644 --- a/app/graphql/types/packages/conan/file_metadatum_type.rb +++ b/app/graphql/types/packages/conan/file_metadatum_type.rb @@ -11,11 +11,16 @@ class FileMetadatumType < BaseObject authorize :read_package - field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, description: 'Type of the Conan file.' - field :conan_package_reference, GraphQL::Types::String, null: true, description: 'Reference of the Conan package.' - field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, description: 'ID of the metadatum.' - field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.', method: :package_revision_value - field :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.', method: :recipe_revision_value + field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, + description: 'Type of the Conan file.' + field :conan_package_reference, GraphQL::Types::String, null: true, + description: 'Reference of the Conan package.' + field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, + description: 'ID of the metadatum.' + field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.', + method: :package_revision_value + field :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.', + method: :recipe_revision_value end end end diff --git a/app/graphql/types/packages/helm/dependency_type.rb b/app/graphql/types/packages/helm/dependency_type.rb index 9bf12d92004c6f8c5473abb6107c3368017e08d4..dc513867c7e794a2ba51da4df1fc14ea2d0b748e 100644 --- a/app/graphql/types/packages/helm/dependency_type.rb +++ b/app/graphql/types/packages/helm/dependency_type.rb @@ -9,10 +9,15 @@ class DependencyType < BaseObject description 'Represents a Helm dependency' # Need to be synced with app/validators/json_schemas/helm_metadata.json#dependencies - field :alias, GraphQL::Types::String, null: true, description: 'Alias of the dependency.', resolver_method: :resolve_alias + field :alias, + GraphQL::Types::String, + null: true, + description: 'Alias of the dependency.', + resolver_method: :resolve_alias field :condition, GraphQL::Types::String, null: true, description: 'Condition of the dependency.' field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates the dependency is enabled.' - field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: :'import-values' + field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', + hash_key: :'import-values' field :name, GraphQL::Types::String, null: true, description: 'Name of the dependency.' field :repository, GraphQL::Types::String, null: true, description: 'Repository of the dependency.' field :tags, [GraphQL::Types::String], null: true, description: 'Tags of the dependency.' diff --git a/app/graphql/types/packages/helm/metadata_type.rb b/app/graphql/types/packages/helm/metadata_type.rb index 77062a48bc3be26bf0fa72b54be584c41158b113..7d769a9ef5f960be117e7c208ab21e8b741af646 100644 --- a/app/graphql/types/packages/helm/metadata_type.rb +++ b/app/graphql/types/packages/helm/metadata_type.rb @@ -10,17 +10,31 @@ class MetadataType < BaseObject # Need to be synced with app/validators/json_schemas/helm_metadata.json field :annotations, GraphQL::Types::JSON, null: true, description: 'Annotations for the chart.' # rubocop:disable Graphql/JSONType - field :api_version, GraphQL::Types::String, null: false, description: 'API version of the chart.', hash_key: :apiVersion - field :app_version, GraphQL::Types::String, null: true, description: 'App version of the chart.', hash_key: :appVersion + field :api_version, + GraphQL::Types::String, + null: false, + description: 'API version of the chart.', + hash_key: :apiVersion + field :app_version, + GraphQL::Types::String, + null: true, + description: 'App version of the chart.', + hash_key: :appVersion field :condition, GraphQL::Types::String, null: true, description: 'Condition for the chart.' - field :dependencies, [Types::Packages::Helm::DependencyType], null: true, description: 'Dependencies of the chart.' + field :dependencies, [Types::Packages::Helm::DependencyType], null: true, + description: 'Dependencies of the chart.' field :deprecated, GraphQL::Types::Boolean, null: true, description: 'Indicates if the chart is deprecated.' field :description, GraphQL::Types::String, null: true, description: 'Description of the chart.' field :home, GraphQL::Types::String, null: true, description: 'URL of the home page.' field :icon, GraphQL::Types::String, null: true, description: 'URL to an SVG or PNG image for the chart.' field :keywords, [GraphQL::Types::String], null: true, description: 'Keywords for the chart.' - field :kube_version, GraphQL::Types::String, null: true, description: 'Kubernetes versions for the chart.', hash_key: :kubeVersion - field :maintainers, [Types::Packages::Helm::MaintainerType], null: true, description: 'Maintainers of the chart.' + field :kube_version, + GraphQL::Types::String, + null: true, + description: 'Kubernetes versions for the chart.', + hash_key: :kubeVersion + field :maintainers, [Types::Packages::Helm::MaintainerType], null: true, + description: 'Maintainers of the chart.' field :name, GraphQL::Types::String, null: false, description: 'Name of the chart.' field :sources, [GraphQL::Types::String], null: true, description: 'URLs of the source code for the chart.' field :tags, GraphQL::Types::String, null: true, description: 'Tags for the chart.' diff --git a/app/graphql/types/packages/nuget/dependency_link_metadatum_type.rb b/app/graphql/types/packages/nuget/dependency_link_metadatum_type.rb index f410e62b56ac1ec25c4746fcbf4f31b92b8aee26..a51f78ad2946c582ebf65fa90e4420336235f88e 100644 --- a/app/graphql/types/packages/nuget/dependency_link_metadatum_type.rb +++ b/app/graphql/types/packages/nuget/dependency_link_metadatum_type.rb @@ -9,8 +9,10 @@ class DependencyLinkMetadatumType < BaseObject authorize :read_package - field :id, ::Types::GlobalIDType[::Packages::Nuget::DependencyLinkMetadatum], null: false, description: 'ID of the metadatum.' - field :target_framework, GraphQL::Types::String, null: false, description: 'Target framework of the dependency link package.' + field :id, ::Types::GlobalIDType[::Packages::Nuget::DependencyLinkMetadatum], null: false, + description: 'ID of the metadatum.' + field :target_framework, GraphQL::Types::String, null: false, + description: 'Target framework of the dependency link package.' end end end diff --git a/app/graphql/types/packages/package_dependency_link_type.rb b/app/graphql/types/packages/package_dependency_link_type.rb index 8b1d4abf3ba757ed81bde167c75e87ee43a12601..d49c467a53da54b576cf2cc84320b89cad0cdefd 100644 --- a/app/graphql/types/packages/package_dependency_link_type.rb +++ b/app/graphql/types/packages/package_dependency_link_type.rb @@ -9,7 +9,8 @@ class PackageDependencyLinkType < BaseObject field :dependency, Types::Packages::PackageDependencyType, null: true, description: 'Dependency.' field :dependency_type, Types::Packages::PackageDependencyTypeEnum, null: false, description: 'Dependency type.' - field :id, ::Types::GlobalIDType[::Packages::DependencyLink], null: false, description: 'ID of the dependency link.' + field :id, ::Types::GlobalIDType[::Packages::DependencyLink], null: false, + description: 'ID of the dependency link.' field :metadata, Types::Packages::DependencyLinkMetadataType, null: true, description: 'Dependency link metadata.' # NOTE: This method must be kept in sync with the union diff --git a/app/graphql/types/packages/package_details_type.rb b/app/graphql/types/packages/package_details_type.rb index 8b2600e10fff7800c6cb6b5851a67b76e2976080..a90b39b8f001689f92f939cb6dd1aa57a7a87acd 100644 --- a/app/graphql/types/packages/package_details_type.rb +++ b/app/graphql/types/packages/package_details_type.rb @@ -13,11 +13,17 @@ class PackageDetailsType < PackageType field :versions, ::Types::Packages::PackageBaseType.connection_type, null: true, description: 'Other versions of the package.' - field :package_files, Types::Packages::PackageFileType.connection_type, null: true, method: :installable_package_files, description: 'Package files.' + field :package_files, + Types::Packages::PackageFileType.connection_type, + null: true, + method: :installable_package_files, + description: 'Package files.' - field :dependency_links, Types::Packages::PackageDependencyLinkType.connection_type, null: true, description: 'Dependency link.' + field :dependency_links, Types::Packages::PackageDependencyLinkType.connection_type, null: true, + description: 'Dependency link.' - field :composer_config_repository_url, GraphQL::Types::String, null: true, description: 'Url of the Composer setup endpoint.' + field :composer_config_repository_url, GraphQL::Types::String, null: true, + description: 'Url of the Composer setup endpoint.' field :composer_url, GraphQL::Types::String, null: true, description: 'Url of the Composer endpoint.' field :conan_url, GraphQL::Types::String, null: true, description: 'Url of the Conan project endpoint.' field :maven_url, GraphQL::Types::String, null: true, description: 'Url of the Maven project endpoint.' @@ -26,9 +32,11 @@ class PackageDetailsType < PackageType field :pypi_setup_url, GraphQL::Types::String, null: true, description: 'Url of the PyPi project setup endpoint.' field :pypi_url, GraphQL::Types::String, null: true, description: 'Url of the PyPi project endpoint.' - field :last_downloaded_at, Types::TimeType, null: true, description: 'Last time that a file of this package was downloaded.' + field :last_downloaded_at, Types::TimeType, null: true, + description: 'Last time that a file of this package was downloaded.' - field :public_package, GraphQL::Types::Boolean, null: true, description: 'Indicates if there is public access to the package.' + field :public_package, GraphQL::Types::Boolean, null: true, + description: 'Indicates if there is public access to the package.' def composer_config_repository_url composer_config_repository_name(object.project.group&.id) diff --git a/app/graphql/types/packages/package_type_enum.rb b/app/graphql/types/packages/package_type_enum.rb index 17145d8e000156761c6a284cb4b29b885ed13c20..8f0637aa6a44212be8a8c018b9e4d1904d9d145b 100644 --- a/app/graphql/types/packages/package_type_enum.rb +++ b/app/graphql/types/packages/package_type_enum.rb @@ -11,7 +11,9 @@ class PackageTypeEnum < BaseEnum ::Packages::Package.package_types.keys.each do |package_type| type_name = PACKAGE_TYPE_NAMES.fetch(package_type.to_sym, package_type.capitalize) - value package_type.to_s.upcase, description: "Packages from the #{type_name} package manager", value: package_type.to_s + value package_type.to_s.upcase, + description: "Packages from the #{type_name} package manager", + value: package_type.to_s end end end diff --git a/app/graphql/types/packages/pypi/metadatum_type.rb b/app/graphql/types/packages/pypi/metadatum_type.rb index 8ccdb592c52001928bb39635f0d55be87170676d..34500c06172f6452cf39ac330f38a9bb7c5af3d3 100644 --- a/app/graphql/types/packages/pypi/metadatum_type.rb +++ b/app/graphql/types/packages/pypi/metadatum_type.rb @@ -18,7 +18,8 @@ class MetadatumType < BaseObject field :id, ::Types::GlobalIDType[::Packages::Pypi::Metadatum], null: false, description: 'ID of the metadatum.' field :keywords, GraphQL::Types::String, null: true, description: 'List of keywords, separated by commas.' field :metadata_version, GraphQL::Types::String, null: true, description: 'Metadata version.' - field :required_python, GraphQL::Types::String, null: true, description: 'Required Python version of the Pypi package.' + field :required_python, GraphQL::Types::String, null: true, + description: 'Required Python version of the Pypi package.' field :summary, GraphQL::Types::String, null: true, description: 'One-line summary of the description.' end end diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index 1271060c5b2a5f1c3026587e453ba44459984a6c..1367c600c13a15d3c1fdb8e3389b280e2f0d3153 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -190,7 +190,8 @@ class ProjectType < BaseObject field :only_allow_merge_if_all_discussions_are_resolved, GraphQL::Types::Boolean, null: true, - description: 'Indicates if merge requests of the project can only be merged when all the discussions are resolved.' + description: 'Indicates if merge requests of the project can only be merged ' \ + 'when all the discussions are resolved.' field :only_allow_merge_if_pipeline_succeeds, GraphQL::Types::Boolean, null: true, @@ -658,7 +659,8 @@ class ProjectType < BaseObject field :data_transfer, Types::DataTransfer::ProjectDataTransferType, null: true, # disallow null once data_transfer_monitoring feature flag is rolled-out! https://gitlab.com/gitlab-org/gitlab/-/issues/391682 resolver: Resolvers::DataTransfer::ProjectDataTransferResolver, - description: 'Data transfer data point for a specific period. This is mocked data under a development feature flag.' + description: 'Data transfer data point for a specific period. ' \ + 'This is mocked data under a development feature flag.' field :visible_forks, Types::ProjectType.connection_type, null: true,