Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d8cc6591
Commit
d8cc6591
authored
Nov 04, 2021
by
João Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused files
parent
de2a0cb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
91 deletions
+0
-91
lib/bulk_imports/groups/graphql/get_milestones_query.rb
lib/bulk_imports/groups/graphql/get_milestones_query.rb
+0
-56
spec/lib/bulk_imports/groups/graphql/get_milestones_query_spec.rb
.../bulk_imports/groups/graphql/get_milestones_query_spec.rb
+0
-35
No files found.
lib/bulk_imports/groups/graphql/get_milestones_query.rb
deleted
100644 → 0
View file @
de2a0cb9
# frozen_string_literal: true
module
BulkImports
module
Groups
module
Graphql
module
GetMilestonesQuery
extend
self
def
to_s
<<-
'GRAPHQL'
query ($full_path: ID!, $cursor: String, $per_page: Int) {
group(fullPath: $full_path) {
milestones(first: $per_page, after: $cursor, includeDescendants: false) {
page_info: pageInfo {
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
iid
title
description
state
start_date: startDate
due_date: dueDate
created_at: createdAt
updated_at: updatedAt
}
}
}
}
GRAPHQL
end
def
variables
(
context
)
{
full_path:
context
.
entity
.
source_full_path
,
cursor:
context
.
tracker
.
next_page
,
per_page:
::
BulkImports
::
Tracker
::
DEFAULT_PAGE_SIZE
}
end
def
base_path
%w[data group milestones]
end
def
data_path
base_path
<<
'nodes'
end
def
page_info_path
base_path
<<
'page_info'
end
end
end
end
end
spec/lib/bulk_imports/groups/graphql/get_milestones_query_spec.rb
deleted
100644 → 0
View file @
de2a0cb9
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
BulkImports
::
Groups
::
Graphql
::
GetMilestonesQuery
do
it
'has a valid query'
do
tracker
=
create
(
:bulk_import_tracker
)
context
=
BulkImports
::
Pipeline
::
Context
.
new
(
tracker
)
query
=
GraphQL
::
Query
.
new
(
GitlabSchema
,
described_class
.
to_s
,
variables:
described_class
.
variables
(
context
)
)
result
=
GitlabSchema
.
static_validator
.
validate
(
query
)
expect
(
result
[
:errors
]).
to
be_empty
end
describe
'#data_path'
do
it
'returns data path'
do
expected
=
%w[data group milestones nodes]
expect
(
described_class
.
data_path
).
to
eq
(
expected
)
end
end
describe
'#page_info_path'
do
it
'returns pagination information path'
do
expected
=
%w[data group milestones page_info]
expect
(
described_class
.
page_info_path
).
to
eq
(
expected
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment