Commit 9b4c4af9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'revert-f2779efb' into 'master'

Revert "Merge branch 'revert-mr-54089-incident-3632' into 'master'"

See merge request gitlab-org/gitlab!54296
parents 3eacfe74 9ec21aa1
......@@ -14,6 +14,7 @@ query getState($projectPath: ID!, $iid: String!) {
pipelines(first: 1) {
nodes {
status
warnings
}
}
shouldBeRebased
......
......@@ -172,6 +172,11 @@ export default class MergeRequestStore {
this.canBeMerged = mergeRequest.mergeStatus === 'can_be_merged';
this.canMerge = mergeRequest.userPermissions.canMerge;
this.ciStatus = pipeline?.status.toLowerCase();
if (pipeline?.warnings && this.ciStatus === 'success') {
this.ciStatus = `${this.ciStatus}-with-warnings`;
}
this.commitsCount = mergeRequest.commitCount || 10;
this.branchMissing = !mergeRequest.sourceBranchExists || !mergeRequest.targetBranchExists;
this.hasConflicts = mergeRequest.conflicts;
......
......@@ -27,6 +27,9 @@ module Types
field :status, PipelineStatusEnum, null: false,
description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :warnings, GraphQL::BOOLEAN_TYPE, null: false, method: :has_warnings?,
description: "Indicates if a pipeline has warnings."
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
description: 'Detailed status of the pipeline.'
......
---
title: Added warnings field to the pipelines GraphQL type
merge_request: 54296
author:
type: added
......@@ -18668,6 +18668,11 @@ type Pipeline {
Permissions for the current user on the resource
"""
userPermissions: PipelinePermissions!
"""
Indicates if a pipeline has warnings.
"""
warnings: Boolean!
}
type PipelineAnalytics {
......
......@@ -54675,6 +54675,24 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "warnings",
"description": "Indicates if a pipeline has warnings.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
......@@ -2820,6 +2820,7 @@ Information about pagination in a connection..
| `upstream` | Pipeline | Pipeline that triggered the pipeline. |
| `user` | User | Pipeline user. |
| `userPermissions` | PipelinePermissions! | Permissions for the current user on the resource |
| `warnings` | Boolean! | Indicates if a pipeline has warnings. |
### PipelineAnalytics
......
......@@ -12,7 +12,7 @@ RSpec.describe Types::Ci::PipelineType do
id iid sha before_sha status detailed_status config_source duration
coverage created_at updated_at started_at finished_at committed_at
stages user retryable cancelable jobs source_job downstream
upstream path project active user_permissions
upstream path project active user_permissions warnings
]
if Gitlab.ee?
......
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