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
d1cbcaf1
Commit
d1cbcaf1
authored
Aug 25, 2020
by
Laura Montemayor
Committed by
lauraMon
Aug 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up some specs and refactored
* Uses Global ID * Updates schema
parent
25b3a293
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
20 deletions
+25
-20
app/graphql/mutations/ci/base.rb
app/graphql/mutations/ci/base.rb
+2
-2
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+7
-2
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+12
-2
spec/requests/api/graphql/mutations/ci/pipeline_cancel_spec.rb
...requests/api/graphql/mutations/ci/pipeline_cancel_spec.rb
+1
-7
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
...equests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
+2
-6
spec/requests/api/graphql/mutations/ci/pipeline_retry_spec.rb
.../requests/api/graphql/mutations/ci/pipeline_retry_spec.rb
+1
-1
No files found.
app/graphql/mutations/ci/base.rb
View file @
d1cbcaf1
...
...
@@ -3,14 +3,14 @@
module
Mutations
module
Ci
class
Base
<
BaseMutation
argument
:id
,
GraphQL
::
ID_TYPE
,
argument
:id
,
::
Types
::
GlobalIDType
[
::
Ci
::
Pipeline
]
,
required:
true
,
description:
'The id of the pipeline to mutate'
private
def
find_object
(
id
:)
::
Ci
::
Pipeline
.
find
(
id
)
GlobalID
::
Locator
.
locate
(
id
)
end
end
end
...
...
doc/api/graphql/reference/gitlab_schema.graphql
View file @
d1cbcaf1
...
...
@@ -1566,6 +1566,11 @@ type CiJobEdge {
node
:
CiJob
}
"""
Identifier of Ci::Pipeline
"""
scalar
CiPipelineID
type
CiStage
{
"""
Group
of
jobs
for
the
stage
...
...
@@ -10630,7 +10635,7 @@ input PipelineDestroyInput {
"""
The
id
of
the
pipeline
to
mutate
"""
id
:
ID
!
id
:
CiPipeline
ID
!
}
"""
...
...
@@ -10692,7 +10697,7 @@ input PipelineRetryInput {
"""
The
id
of
the
pipeline
to
mutate
"""
id
:
ID
!
id
:
CiPipeline
ID
!
}
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
d1cbcaf1
...
...
@@ -4249,6 +4249,16 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "CiPipelineID",
"description": "Identifier of Ci::Pipeline",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiStage",
...
...
@@ -31883,7 +31893,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "ID",
"name": "
CiPipeline
ID",
"ofType": null
}
},
...
...
@@ -32083,7 +32093,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "ID",
"name": "
CiPipeline
ID",
"ofType": null
}
},
spec/requests/api/graphql/mutations/ci/pipeline_cancel_spec.rb
View file @
d1cbcaf1
...
...
@@ -9,13 +9,7 @@ RSpec.describe 'PipelineCancel' do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:pipeline
)
{
create
(
:ci_pipeline
,
:running
,
project:
project
,
user:
user
)
}
let
(
:mutation
)
do
graphql_mutation
(
:pipeline_cancel
,
{},
<<-
QL
errors
QL
)
end
let
(
:mutation
)
{
graphql_mutation
(
:pipeline_cancel
,
{},
'errors'
)
}
let
(
:mutation_response
)
{
graphql_mutation_response
(
:pipeline_cancel
)
}
...
...
spec/requests/api/graphql/mutations/ci/pipeline_destroy_spec.rb
View file @
d1cbcaf1
...
...
@@ -11,13 +11,9 @@ RSpec.describe 'PipelineDestroy' do
let
(
:mutation
)
do
variables
=
{
id:
pipeline
.
id
id:
pipeline
.
to_global_id
.
to_s
}
graphql_mutation
(
:pipeline_destroy
,
variables
,
<<-
QL
errors
QL
)
graphql_mutation
(
:pipeline_destroy
,
variables
,
'errors'
)
end
it
'returns an error if the user is not allowed to destroy the pipeline'
do
...
...
spec/requests/api/graphql/mutations/ci/pipeline_retry_spec.rb
View file @
d1cbcaf1
...
...
@@ -11,7 +11,7 @@ RSpec.describe 'PipelineRetry' do
let
(
:mutation
)
do
variables
=
{
id:
pipeline
.
id
id:
pipeline
.
to_global_id
.
to_s
}
graphql_mutation
(
:pipeline_retry
,
variables
,
<<-
QL
...
...
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