CodeQuality data is exposed in MergeRequestWidgetEntity as `codeclimate`
Summary
The MergeRequestWidgetEntity is built to
expose :codeclimate, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:codequality) } do
Improvements
Using the brand name of a tool within CodeQuality is unnecessarily confusing, and not technically accurate. We should change the Entity to expose codequality
data as codequality
.
Risks
If we're not aware of another reference to that field, that reference will break when codeclimate
no longer shows up in the response.
Involved components
-
app/serializers/merge_request_widget_entity.rb
-
ee/spec/fixtures/api/schemas/entities/merge_request_widget.json
-
ee/spec/features/projects/pipelines/pipeline_spec.rb
-
ee/spec/serializers/merge_request_widget_entity_spec.rb
-
spec/serializers/merge_request_widget_entity_spec.rb
frontend: We'll have to change these files:
-
app/assets/javascripts/reports/codequality_report/grouped_codequality_reports_app.vue
-
app/assets/javascripts/reports/codequality_report/store/actions.js
-
app/assets/javascripts/reports/codequality_report/store/utils/codequality_comparison.js
-
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
-
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
And their corresponding specs:
-
spec/frontend/reports/codequality_report/grouped_codequality_reports_app_spec.js
-
spec/frontend/reports/codequality_report/store/utils/codequality_comparison_spec.js
-
spec/frontend/reports/components/report_section_spec.js
-
spec/frontend/vue_mr_widget/mock_data.js
In ee/
we'll have to change:
-
ee/app/assets/javascripts/codequality_report/codequality_report.vue
-
ee/app/assets/javascripts/codequality_report/store/actions.js
-
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
And just one ee/
spec:
-
ee/spec/frontend/codequality_report/codequality_report_spec.js
Edited by drew stachon