Status checks widget shouldn't appear if no status checks match the branch
Summary
If status checks have been defined but no status checks match the branch the MR is using, the status checks widget still appears but only with the widget header:
Steps to reproduce
- Create a status check in
[HOST]/[GROUP]/[PROJECT]/edit#js-merge-request-settings
>Status checks
- Create a mergeable MR which uses a different branch from the defined status check
- In the MR see the status checks widget appear with only a header
What is the current bug behavior?
The status checks widget header appears even when there are no matching status checks
What is the expected correct behavior?
The status checks widget should not appear at all if there are no matching status checks
Possible fixes
Update the status_checks_report_app
to hide the whole section if there are no status checks
Implementation plan (Draft)
backend -
- Update
ee/app/presenters/ee/merge_request_presenter.rb:71
to filter out any status checks which don't match the MR's branch - Update
ee/spec/presenters/merge_request_presenter_spec.rb:184
to test this is the case
Edited by Robert Hunt