Update logic to show pipeline suggestion banner
What does this MR do and why?
In #337560 (closed), we want to give administrators the ability to disable showing the pipeline suggestion banner in merge requests with no pipeline.
!70786 (merged) adds "Enable pipeline suggestion banner" in the admin settings CI/CD page.
This MR updates the logic to display (or not) the pipeline suggestion banner. It adds a check for the state of "Enable suggestion pipeline banner" introduced in !70786 (merged).
Screenshots or screen recordings
How to set up and validate locally
Validate that the suggest pipeline banner is shown by default
- Login as an administrator
- On the top bar, select Menu > Admin
- On the left sidebar, select Settings > CI/CD
- Expand Continuous Integration and Deployment
- Confirm that Enable pipeline suggestion banner checkbox is checked
- Go to an MR without a pipeline
- Create a project with Auto DevOps disabled in the project settings CI/CD section (Auto DevOps will add pipelines to a MR which we don't want)
- Create a MR in the project (edit the README in Web IDE and commit with create MR option checked)
- Validate that the pipeline suggestion banner is shown
Validate that the suggest pipeline banner can be disabled
- Go back to the CI/CD settings page and uncheck Enable pipeline suggestion banner checkbox
- Click on Save changes
- Confirm that Enable pipeline suggestion banner checkbox is unchecked
- Go back to the MR without a pipeline
- Validate that the suggest pipeline banner is no longer shown
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugie Limpin