From 95ff19a65c5236863e4c7c7e198bfc1e2fa70f07 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 27 Nov 2020 12:09:14 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../javascripts/ci_lint/components/ci_lint.vue | 7 +- .../ci_lint/components/ci_lint_results.vue | 143 --------------------- .../ci_lint/components/ci_lint_results_param.vue | 26 ---- .../ci_lint/components/ci_lint_results_value.vue | 81 ------------ .../ci_lint/components/ci_lint_warnings.vue | 69 ---------- .../graphql/mutations/lint_ci.mutation.graphql | 22 ---- .../javascripts/ci_lint/graphql/resolvers.js | 34 ----- app/assets/javascripts/ci_lint/index.js | 3 +- 8 files changed, 6 insertions(+), 379 deletions(-) delete mode 100644 app/assets/javascripts/ci_lint/components/ci_lint_results.vue delete mode 100644 app/assets/javascripts/ci_lint/components/ci_lint_results_param.vue delete mode 100644 app/assets/javascripts/ci_lint/components/ci_lint_results_value.vue delete mode 100644 app/assets/javascripts/ci_lint/components/ci_lint_warnings.vue delete mode 100644 app/assets/javascripts/ci_lint/graphql/mutations/lint_ci.mutation.graphql delete mode 100644 app/assets/javascripts/ci_lint/graphql/resolvers.js (limited to 'app/assets/javascripts/ci_lint') diff --git a/app/assets/javascripts/ci_lint/components/ci_lint.vue b/app/assets/javascripts/ci_lint/components/ci_lint.vue index def45026b35..731ed2ddd01 100644 --- a/app/assets/javascripts/ci_lint/components/ci_lint.vue +++ b/app/assets/javascripts/ci_lint/components/ci_lint.vue @@ -1,8 +1,8 @@ - - diff --git a/app/assets/javascripts/ci_lint/components/ci_lint_results_param.vue b/app/assets/javascripts/ci_lint/components/ci_lint_results_param.vue deleted file mode 100644 index 23808bcb292..00000000000 --- a/app/assets/javascripts/ci_lint/components/ci_lint_results_param.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/app/assets/javascripts/ci_lint/components/ci_lint_results_value.vue b/app/assets/javascripts/ci_lint/components/ci_lint_results_value.vue deleted file mode 100644 index 4929c3206df..00000000000 --- a/app/assets/javascripts/ci_lint/components/ci_lint_results_value.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - diff --git a/app/assets/javascripts/ci_lint/components/ci_lint_warnings.vue b/app/assets/javascripts/ci_lint/components/ci_lint_warnings.vue deleted file mode 100644 index ac0332cb0bd..00000000000 --- a/app/assets/javascripts/ci_lint/components/ci_lint_warnings.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - diff --git a/app/assets/javascripts/ci_lint/graphql/mutations/lint_ci.mutation.graphql b/app/assets/javascripts/ci_lint/graphql/mutations/lint_ci.mutation.graphql deleted file mode 100644 index 496036f690f..00000000000 --- a/app/assets/javascripts/ci_lint/graphql/mutations/lint_ci.mutation.graphql +++ /dev/null @@ -1,22 +0,0 @@ -mutation lintCI($endpoint: String, $content: String, $dry: Boolean) { - lintCI(endpoint: $endpoint, content: $content, dry_run: $dry) @client { - valid - errors - warnings - jobs { - afterScript - allowFailure - beforeScript - environment - except - name - only { - refs - } - afterScript - stage - tagList - when - } - } -} diff --git a/app/assets/javascripts/ci_lint/graphql/resolvers.js b/app/assets/javascripts/ci_lint/graphql/resolvers.js deleted file mode 100644 index 126b4c664b2..00000000000 --- a/app/assets/javascripts/ci_lint/graphql/resolvers.js +++ /dev/null @@ -1,34 +0,0 @@ -import axios from '~/lib/utils/axios_utils'; - -const resolvers = { - Mutation: { - lintCI: (_, { endpoint, content, dry_run }) => { - return axios.post(endpoint, { content, dry_run }).then(({ data }) => ({ - valid: data.valid, - errors: data.errors, - warnings: data.warnings, - jobs: data.jobs.map(job => { - const only = job.only ? { refs: job.only.refs, __typename: 'CiLintJobOnlyPolicy' } : null; - - return { - name: job.name, - stage: job.stage, - beforeScript: job.before_script, - script: job.script, - afterScript: job.after_script, - tagList: job.tag_list, - environment: job.environment, - when: job.when, - allowFailure: job.allow_failure, - only, - except: job.except, - __typename: 'CiLintJob', - }; - }), - __typename: 'CiLintContent', - })); - }, - }, -}; - -export default resolvers; diff --git a/app/assets/javascripts/ci_lint/index.js b/app/assets/javascripts/ci_lint/index.js index e4cda4cb369..274aab45deb 100644 --- a/app/assets/javascripts/ci_lint/index.js +++ b/app/assets/javascripts/ci_lint/index.js @@ -1,8 +1,9 @@ import Vue from 'vue'; import VueApollo from 'vue-apollo'; import createDefaultClient from '~/lib/graphql'; +import { resolvers } from '~/pipeline_editor/graphql/resolvers'; + import CiLint from './components/ci_lint.vue'; -import resolvers from './graphql/resolvers'; Vue.use(VueApollo); -- cgit v1.2.1