Show warning message if "Pipelines for merge requests" is not configured but "Pipelines for merged results" is enabled
Problem
Some users/customers are confused with the current implementation that there are no warnings shown when:
- They have not set up Pipelines for merge requests yet. i.e. gitlab-ci.yml doesn't include
only: [merge_requests]
- They have enabled Pipelines for merged results
We clarified the first point in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28050#note_166442364, however, ideally we should show a warning in merge request widget that it's misconfigured.
Proposal
Show warning in the merge request widget page that indicate user needs to configure pipelines for merge request.
- The application should be able to recognize when pipelines for merged results is configured, but the
gitlab-ci.yml
doesn't includeonly: [merge_requests]
. - Given the configuration is missing, in the merge request widget user sees a warning message. (SEE DESIGNS TAB)
- User should be presented with the option to see the documentation for Configuring pipelines for merge requests.
- The warning message should be removed once all configuration is done.
Designs
Backend details
Condition:
showMergePipelineMisconfiguredWarning() {
return Boolean(
this.mr.mergePipelinesEnabled && !this.mr.pipeline.merge_request
);
},