diff options
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/stores')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js b/app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js index 2ae4f4da2f3..18d955652ba 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js @@ -3,8 +3,6 @@ import { stateKey } from './state_maps'; export default function deviseState() { if (!this.commitsCount) { return stateKey.nothingToMerge; - } else if (this.hasMergeChecksFailed && !this.autoMergeEnabled) { - return stateKey.mergeChecksFailed; } else if (this.projectArchived) { return stateKey.archived; } else if (this.branchMissing) { @@ -15,6 +13,8 @@ export default function deviseState() { return stateKey.conflicts; } else if (this.shouldBeRebased) { return stateKey.rebase; + } else if (this.hasMergeChecksFailed && !this.autoMergeEnabled) { + return stateKey.mergeChecksFailed; } else if (this.onlyAllowMergeIfPipelineSucceeds && this.isPipelineFailed) { return stateKey.pipelineFailed; } else if (this.draft) { diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js index 146cf7e11a7..03c9a01cc7a 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js @@ -33,6 +33,7 @@ export default class MergeRequestStore { this.setData(data); this.initCodeQualityReport(data); + this.initSecurityReport(data); this.setGitpodData(data); } @@ -41,6 +42,19 @@ export default class MergeRequestStore { this.codeQuality = data.codequality_reports_path; } + initSecurityReport(data) { + // TODO: check if gl.mrWidgetData can be safely removed after we migrate to the + // widget extension. + this.securityReportPaths = { + apiFuzzingReportPath: data.api_fuzzing_comparison_path, + coverageFuzzingReportPath: data.coverage_fuzzing_comparison_path, + sastReportPath: data.sast_comparison_path, + dastReportPath: data.dast_comparison_path, + secretDetectionReportPath: data.secret_detection_comparison_path, + dependencyScanningReportPath: data.dependency_scanning_comparison_path, + }; + } + setData(data, isRebased) { this.initApprovals(); |