Commit a4de92f0 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'lm-add-pipeline-actions' into 'master'

GraphQL: Add retryable and cancelable to PipelineType

See merge request gitlab-org/gitlab!40780
parents f174031b 24eb82f9
...@@ -48,6 +48,14 @@ module Types ...@@ -48,6 +48,14 @@ module Types
field :user, Types::UserType, null: true, field :user, Types::UserType, null: true,
description: 'Pipeline user', description: 'Pipeline user',
resolve: -> (pipeline, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, pipeline.user_id).find } resolve: -> (pipeline, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, pipeline.user_id).find }
field :retryable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be retried',
method: :retryable?,
null: false
field :cancelable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be canceled',
method: :cancelable?,
null: false
end end
end end
end end
......
---
title: 'GraphQL: Add retryable and cancelable to PipelineType'
merge_request: 40780
author:
type: added
...@@ -11333,6 +11333,11 @@ type Pipeline { ...@@ -11333,6 +11333,11 @@ type Pipeline {
""" """
beforeSha: String beforeSha: String
"""
Specifies if a pipeline can be canceled
"""
cancelable: Boolean!
""" """
Timestamp of the pipeline's commit Timestamp of the pipeline's commit
""" """
...@@ -11380,6 +11385,11 @@ type Pipeline { ...@@ -11380,6 +11385,11 @@ type Pipeline {
""" """
iid: String! iid: String!
"""
Specifies if a pipeline can be retried
"""
retryable: Boolean!
""" """
Vulnerability and scanned resource counts for each security scanner of the pipeline Vulnerability and scanned resource counts for each security scanner of the pipeline
""" """
......
...@@ -33724,6 +33724,24 @@ ...@@ -33724,6 +33724,24 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "cancelable",
"description": "Specifies if a pipeline can be canceled",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "committedAt", "name": "committedAt",
"description": "Timestamp of the pipeline's commit", "description": "Timestamp of the pipeline's commit",
...@@ -33866,6 +33884,24 @@ ...@@ -33866,6 +33884,24 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "retryable",
"description": "Specifies if a pipeline can be retried",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "securityReportSummary", "name": "securityReportSummary",
"description": "Vulnerability and scanned resource counts for each security scanner of the pipeline", "description": "Vulnerability and scanned resource counts for each security scanner of the pipeline",
...@@ -1693,6 +1693,7 @@ Information about pagination in a connection. ...@@ -1693,6 +1693,7 @@ Information about pagination in a connection.
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `beforeSha` | String | Base SHA of the source branch | | `beforeSha` | String | Base SHA of the source branch |
| `cancelable` | Boolean! | Specifies if a pipeline can be canceled |
| `committedAt` | Time | Timestamp of the pipeline's commit | | `committedAt` | Time | Timestamp of the pipeline's commit |
| `configSource` | PipelineConfigSourceEnum | Config source of the pipeline (UNKNOWN_SOURCE, REPOSITORY_SOURCE, AUTO_DEVOPS_SOURCE, WEBIDE_SOURCE, REMOTE_SOURCE, EXTERNAL_PROJECT_SOURCE, BRIDGE_SOURCE, PARAMETER_SOURCE) | | `configSource` | PipelineConfigSourceEnum | Config source of the pipeline (UNKNOWN_SOURCE, REPOSITORY_SOURCE, AUTO_DEVOPS_SOURCE, WEBIDE_SOURCE, REMOTE_SOURCE, EXTERNAL_PROJECT_SOURCE, BRIDGE_SOURCE, PARAMETER_SOURCE) |
| `coverage` | Float | Coverage percentage | | `coverage` | Float | Coverage percentage |
...@@ -1702,6 +1703,7 @@ Information about pagination in a connection. ...@@ -1702,6 +1703,7 @@ Information about pagination in a connection.
| `finishedAt` | Time | Timestamp of the pipeline's completion | | `finishedAt` | Time | Timestamp of the pipeline's completion |
| `id` | ID! | ID of the pipeline | | `id` | ID! | ID of the pipeline |
| `iid` | String! | Internal ID of the pipeline | | `iid` | String! | Internal ID of the pipeline |
| `retryable` | Boolean! | Specifies if a pipeline can be retried |
| `securityReportSummary` | SecurityReportSummary | Vulnerability and scanned resource counts for each security scanner of the pipeline | | `securityReportSummary` | SecurityReportSummary | Vulnerability and scanned resource counts for each security scanner of the pipeline |
| `sha` | String! | SHA of the pipeline's commit | | `sha` | String! | SHA of the pipeline's commit |
| `startedAt` | Time | Timestamp when the pipeline was started | | `startedAt` | Time | Timestamp when the pipeline was started |
......
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