diff options
Diffstat (limited to 'app')
8 files changed, 8 insertions, 50 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/checks/message.vue b/app/assets/javascripts/vue_merge_request_widget/components/checks/message.vue index 058b9e1fe99..e91c76e7ff0 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/checks/message.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/checks/message.vue @@ -20,6 +20,7 @@ const FAILURE_REASONS = { policies_denied: __('Denied licenses must be removed or approved.'), merge_request_blocked: __('Merge request is blocked by another merge request.'), status_checks_must_pass: __('Status checks must pass.'), + jira_association_missing: __('Either the title or description must reference a Jira issue.'), }; export default { diff --git a/app/graphql/resolvers/ci/runner_groups_resolver.rb b/app/graphql/resolvers/ci/runner_groups_resolver.rb index c1d9bcbb9bb..2928631c705 100644 --- a/app/graphql/resolvers/ci/runner_groups_resolver.rb +++ b/app/graphql/resolvers/ci/runner_groups_resolver.rb @@ -6,7 +6,7 @@ module Resolvers include Gitlab::Graphql::Authorize::AuthorizeResource include ResolvesGroups - type 'Types::GroupConnection', null: true + type Types::GroupType.connection_type, null: true authorize :read_runner authorizes_object! diff --git a/app/graphql/resolvers/groups_resolver.rb b/app/graphql/resolvers/groups_resolver.rb index 902b5279364..f31f7368eeb 100644 --- a/app/graphql/resolvers/groups_resolver.rb +++ b/app/graphql/resolvers/groups_resolver.rb @@ -4,7 +4,7 @@ module Resolvers class GroupsResolver < BaseResolver include ResolvesGroups - type "Types::GroupConnection", null: true + type Types::GroupType.connection_type, null: true argument :search, GraphQL::Types::String, required: false, diff --git a/app/graphql/resolvers/issues/base_parent_resolver.rb b/app/graphql/resolvers/issues/base_parent_resolver.rb index 78ef4132baf..6b3426c5538 100644 --- a/app/graphql/resolvers/issues/base_parent_resolver.rb +++ b/app/graphql/resolvers/issues/base_parent_resolver.rb @@ -15,8 +15,7 @@ module Resolvers raise Gitlab::Graphql::Errors::ArgumentError, Types::IssuableStateEnum::INVALID_LOCKED_MESSAGE } - # see app/graphql/types/issue_connection.rb - type 'Types::IssueConnection', null: true + type Types::IssueType.connection_type, null: true def resolve_with_lookahead(**args) return Issue.none if resource_parent.nil? diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb index bc0e7334303..1b43903a508 100644 --- a/app/graphql/resolvers/issues_resolver.rb +++ b/app/graphql/resolvers/issues_resolver.rb @@ -21,8 +21,7 @@ module Resolvers raise Gitlab::Graphql::Errors::ArgumentError, Types::IssuableStateEnum::INVALID_LOCKED_MESSAGE } - # see app/graphql/types/issue_connection.rb - type 'Types::IssueConnection', null: true + type Types::IssueType.connection_type, null: true before_connection_authorization do |nodes, current_user| projects = nodes.map(&:project) diff --git a/app/graphql/types/group_connection.rb b/app/graphql/types/group_connection.rb deleted file mode 100644 index e4332e24302..00000000000 --- a/app/graphql/types/group_connection.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Normally this wouldn't be needed and we could use -# -# type Types::GroupType.connection_type, null: true -# -# in a resolver. However we can end up with cyclic definitions. -# Running the spec locally can result in errors like -# -# NameError: uninitialized constant Types::GroupType -# -# or other errors. To fix this, we created this file and use -# -# type "Types::GroupConnection", null: true -# -# which gives a delayed resolution, and the proper connection type. -# -# See gitlab/app/graphql/types/ci/runner_type.rb -# Reference: https://github.com/rmosolgo/graphql-ruby/issues/3974#issuecomment-1084444214 -# and https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#testing-tips-and-tricks -# -Types::GroupConnection = Types::GroupType.connection_type diff --git a/app/graphql/types/issue_connection.rb b/app/graphql/types/issue_connection.rb deleted file mode 100644 index 2f07888b43e..00000000000 --- a/app/graphql/types/issue_connection.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Normally this wouldn't be needed and we could use -# -# type Types::IssueType.connection_type, null: true -# -# in a resolver. However we can end up with cyclic definitions. -# Running the spec locally can result in errors like -# -# NameError: uninitialized constant Resolvers::GroupIssuesResolver -# -# or other errors. To fix this, we created this file and use -# -# type "Types::IssueConnection", null: true -# -# which gives a delayed resolution, and the proper connection type. -# -# See app/graphql/resolvers/base_issues_resolver.rb -# Reference: https://github.com/rmosolgo/graphql-ruby/issues/3974#issuecomment-1084444214 -# and https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#testing-tips-and-tricks -# -Types::IssueConnection = Types::IssueType.connection_type diff --git a/app/graphql/types/merge_requests/detailed_merge_status_enum.rb b/app/graphql/types/merge_requests/detailed_merge_status_enum.rb index e7246068a05..d2d0cfd23a4 100644 --- a/app/graphql/types/merge_requests/detailed_merge_status_enum.rb +++ b/app/graphql/types/merge_requests/detailed_merge_status_enum.rb @@ -48,6 +48,9 @@ module Types value 'PREPARING', value: :preparing, description: 'Merge request diff is being created.' + value 'JIRA_ASSOCIATION', + value: :jira_association_missing, + description: 'Either the title or description must reference a Jira issue.' end end end |