Commit f224723a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '299489-over-10-of-graphql-descriptions-are-missing-base-type' into 'master'

Ignore rubocop in base_enum type

See merge request gitlab-org/gitlab!60838
parents 64d9109f 0a2d8a35
......@@ -13,7 +13,6 @@
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/322903
Graphql/Descriptions:
Exclude:
- 'app/graphql/types/base_enum.rb'
- 'app/graphql/types/container_expiration_policy_cadence_enum.rb'
- 'app/graphql/types/container_expiration_policy_keep_enum.rb'
- 'app/graphql/types/container_expiration_policy_older_than_enum.rb'
......
......@@ -17,6 +17,9 @@ module Types
# declarative_enum MyDeclarativeEnum
# end
#
# Disabling descriptions rubocop for a false positive here
# rubocop: disable Graphql/Descriptions
#
def declarative_enum(enum_mod, use_name: true, use_description: true)
graphql_name(enum_mod.name) if use_name
description(enum_mod.description) if use_description
......@@ -25,6 +28,7 @@ module Types
value(key.to_s.upcase, **content)
end
end
# rubocop: enable Graphql/Descriptions
# Helper to define an enum member for each element of a Rails AR enum
def from_rails_enum(enum, description:)
......
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