diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-17 18:07:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-17 18:07:44 +0300 |
commit | 6c41e447edac3453ae0df99fb9232ec71b679b75 (patch) | |
tree | 125416ba49222f7c0deb44950e451e39d45c433b /app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | |
parent | 77ee26b43bda4b092f356d5185f424bad232af36 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index cd4d9398899..965746e79fb 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -46,6 +46,7 @@ import mergeRequestQueryVariablesMixin from './mixins/merge_request_query_variab import getStateQuery from './queries/get_state.query.graphql'; import terraformExtension from './extensions/terraform'; import accessibilityExtension from './extensions/accessibility'; +import codeQualityExtension from './extensions/code_quality'; export default { // False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25 @@ -241,6 +242,11 @@ export default { this.registerTerraformPlans(); } }, + shouldRenderCodeQuality(newVal) { + if (newVal) { + this.registerCodeQualityExtension(); + } + }, shouldShowAccessibilityReport(newVal) { if (newVal) { this.registerAccessibilityExtension(); @@ -491,6 +497,11 @@ export default { registerExtension(accessibilityExtension); } }, + registerCodeQualityExtension() { + if (this.shouldRenderCodeQuality && this.shouldShowExtension) { + registerExtension(codeQualityExtension); + } + }, }, }; </script> @@ -546,7 +557,7 @@ export default { </div> <extensions-container :mr="mr" /> <grouped-codequality-reports-app - v-if="shouldRenderCodeQuality" + v-if="shouldRenderCodeQuality && !shouldShowExtension" :head-blob-path="mr.headBlobPath" :base-blob-path="mr.baseBlobPath" :codequality-reports-path="mr.codequalityReportsPath" |