Skip to content

Fix file include-type for CI lint Graphql endpoint

Furkan Ayhan requested to merge 362241-fix-include-type-enum into master

What does this MR do and why?

This MR fixes the bug introduced in !84279 (merged) with the CI lint GraphQL endpoint when the config includes a "file" include.

We don't have a "project" include type, we have a "file" include type.

Related to #362241 (closed)

How to set up and validate locally

  1. Enter http://gdk.test:3000/-/graphql-explorer.
  2. Lint this config;
include:
  - file: '.gitlab-ci.yml'
    project: 'root/downstream-project'

build:
  stage: build
  script: exit 0

with this query;

query ($content:String!){
  ciConfig(content: $content, projectPath: "root/basic", sha: "ab2c65a2c97e89a42e05b090f9082da4d96ca574") {
    errors
    mergedYaml
    status
    includes {
      contextProject
      contextSha
      extra
      location
      blob
      raw
      type
    }
  }
}
  1. See the correct "includes" Screen_Shot_2022-05-12_at_20.32.27

Before the fix: Screen_Shot_2022-05-12_at_20.34.15

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports

Loading