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
95befdc4
Commit
95befdc4
authored
Aug 28, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds retryable, destroyable, cancelable to pipeline
parent
27784f93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
app/graphql/types/ci/pipeline_type.rb
app/graphql/types/ci/pipeline_type.rb
+12
-0
No files found.
app/graphql/types/ci/pipeline_type.rb
View file @
95befdc4
...
...
@@ -48,6 +48,18 @@ module Types
field
:user
,
Types
::
UserType
,
null:
true
,
description:
'Pipeline user'
,
resolve:
->
(
pipeline
,
_args
,
_context
)
{
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
User
,
pipeline
.
user_id
).
find
}
field
:retryable
,
GraphQL
::
BOOLEAN_TYPE
,
description:
'Specifies if a pipeline is retryable'
,
method: :retryable?
,
null:
false
field
:cancelable
,
GraphQL
::
BOOLEAN_TYPE
,
description:
'Specifies if a pipeline is cancelable'
,
method: :cancelable?
,
null:
false
field
:destroyable
,
GraphQL
::
BOOLEAN_TYPE
,
description:
'Specifies if a pipeline cann be destroyed'
,
null:
false
,
resolve:
->
(
pipeline
,
_args
,
context
)
{
Ability
.
allowed?
(
context
[
:current_user
],
:destroy_pipeline
,
pipeline
)
}
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