diff --git a/app/assets/javascripts/pipeline_editor/components/lint/ci_lint.vue b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint.vue new file mode 100644 index 00000000000..22f734be5aa --- /dev/null +++ b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint.vue @@ -0,0 +1,48 @@ + + + diff --git a/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results.vue b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results.vue index 0d1c214c5b1..14b0a38da58 100644 --- a/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results.vue +++ b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results.vue @@ -10,11 +10,11 @@ const thBorderColor = 'gl-border-gray-100!'; export default { correct: { variant: 'success', - text: __('syntax is correct.'), + text: __('Syntax is correct.'), }, incorrect: { variant: 'danger', - text: __('syntax is incorrect.'), + text: __('Syntax is incorrect.'), }, includesText: __( 'CI configuration validated, including all configuration added with the %{codeStart}includes%{codeEnd} keyword. %{link}', @@ -48,19 +48,23 @@ export default { }, jobs: { type: Array, - required: true, + required: false, + default: () => [], }, errors: { type: Array, - required: true, + required: false, + default: () => [], }, warnings: { type: Array, - required: true, + required: false, + default: () => [], }, dryRun: { type: Boolean, - required: true, + required: false, + default: false, }, lintHelpPagePath: { type: String, diff --git a/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue index 4929c3206df..6c7e03e4920 100644 --- a/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue +++ b/app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue @@ -14,7 +14,7 @@ export default { }, computed: { tagList() { - return this.item.tagList.join(', '); + return this.item.tagList?.join(', '); }, onlyPolicy() { return this.item.only ? this.item.only.refs.join(', ') : this.item.only; @@ -26,15 +26,15 @@ export default { return { beforeScript: { show: !isEmpty(this.item.beforeScript), - content: this.item.beforeScript.join('\n'), + content: this.item.beforeScript?.join('\n'), }, script: { show: !isEmpty(this.item.script), - content: this.item.script.join('\n'), + content: this.item.script?.join('\n'), }, afterScript: { show: !isEmpty(this.item.afterScript), - content: this.item.afterScript.join('\n'), + content: this.item.afterScript?.join('\n'), }, }; }, @@ -43,7 +43,7 @@ export default {