Commit 343876bb authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents f58e30c2 350d0874
......@@ -3,7 +3,8 @@
module Resolvers
module Ci
class RunnerPlatformsResolver < BaseResolver
type Types::Ci::RunnerPlatformType, null: false
type Types::Ci::RunnerPlatformType.connection_type, null: true
description 'Supported runner platforms.'
def resolve(**args)
runner_instructions.map do |platform, data|
......
......@@ -4,6 +4,7 @@ module Resolvers
module Ci
class RunnerSetupResolver < BaseResolver
type Types::Ci::RunnerSetupType, null: true
description 'Runner setup instructions.'
argument :platform, GraphQL::STRING_TYPE,
required: true,
......
......@@ -4,7 +4,7 @@ module ResolvesSnippets
extend ActiveSupport::Concern
included do
type Types::SnippetType.connection_type, null: false
type Types::SnippetType.connection_type, null: true
argument :ids, [::Types::GlobalIDType[::Snippet]],
required: false,
......
......@@ -2,7 +2,7 @@
module Resolvers
class UserStarredProjectsResolver < BaseResolver
type Types::ProjectType, null: true
type Types::ProjectType.connection_type, null: true
argument :search, GraphQL::STRING_TYPE,
required: false,
......
......@@ -3,6 +3,7 @@
module Types
class UserType < BaseObject
graphql_name 'User'
description 'Representation of a GitLab user.'
authorize :read_user
......
......@@ -88,7 +88,6 @@ class Issue < ApplicationRecord
test_case: 2 ## EE-only
}
alias_attribute :parent_ids, :project_id
alias_method :issuing_parent, :project
alias_attribute :external_author, :service_desk_reply_to
......@@ -191,7 +190,8 @@ class Issue < ApplicationRecord
end
def self.relative_positioning_query_base(issue)
in_projects(issue.parent_ids)
projects = issue.project.group&.root_ancestor&.all_projects || issue.project
in_projects(projects)
end
def self.relative_positioning_parent_column
......
......@@ -6444,6 +6444,8 @@ An edge in a connection.
### `User`
Representation of a GitLab user.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `assignedMergeRequests` | [`MergeRequestConnection`](#mergerequestconnection) | Merge Requests assigned to the user. |
......
......@@ -175,21 +175,6 @@ module EE
user.can?(:admin_issue, project) && user.can?(:create_epic, group)
end
# Issue position on boards list should be relative to all group projects
def parent_ids
return super unless has_group_boards?
board_group.all_projects.select(:id)
end
def has_group_boards?
board_group && board_group.boards.any?
end
def board_group
@group ||= project.group
end
def promoted?
!!promoted_to_epic_id
end
......
......@@ -529,9 +529,10 @@ RSpec.describe Issue do
describe 'relative positioning with group boards' do
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:board) { create(:board, group: group) }
let_it_be(:project) { create(:project, namespace: group) }
let_it_be(:project1) { create(:project, namespace: group) }
let_it_be(:project) { create(:project, group: subgroup) }
let_it_be(:project1) { create(:project, group: group) }
let_it_be_with_reload(:issue) { create(:issue, project: project) }
let_it_be_with_reload(:issue1) { create(:issue, project: project1, relative_position: issue.relative_position + RelativePositioning::IDEAL_DISTANCE) }
let(:new_issue) { build(:issue, project: project1, relative_position: nil) }
......
......@@ -9,7 +9,7 @@ RSpec.describe Resolvers::Ci::RunnerPlatformsResolver do
subject(:resolve_subject) { resolve(described_class) }
it 'returns all possible runner platforms' do
expect(resolve_subject).to include(
expect(resolve_subject).to contain_exactly(
hash_including(name: :linux), hash_including(name: :osx),
hash_including(name: :windows), hash_including(name: :docker),
hash_including(name: :kubernetes)
......
......@@ -157,6 +157,9 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'qa/foo' | [:qa]
'ee/qa/foo' | [:qa]
'workhorse/main.go' | [:workhorse]
'workhorse/internal/upload/upload.go' | [:workhorse]
'changelogs/foo' | [:none]
'ee/changelogs/foo' | [:none]
'locale/gitlab.pot' | [:none]
......
......@@ -106,6 +106,8 @@ module Tooling
%r{\A(ee/)?qa/} => :qa,
%r{\Aworkhorse/.*} => :workhorse,
# Files that don't fit into any category are marked with :none
%r{\A(ee/)?changelogs/} => :none,
%r{\Alocale/gitlab\.pot\z} => :none,
......
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