Skip to content

Update logic to show pipeline suggestion banner

Eugie Limpin requested to merge update-suggest-pipeline-banner-logic into master

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.

Screen_Shot_2021-09-22_at_2.01.34_PM

!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

demo

How to set up and validate locally

Validate that the suggest pipeline banner is shown by default

  1. Login as an administrator
  2. On the top bar, select Menu > Admin
  3. On the left sidebar, select Settings > CI/CD
  4. Expand Continuous Integration and Deployment
  5. Confirm that Enable pipeline suggestion banner checkbox is checked
  6. Go to an MR without a pipeline
    1. 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)
    2. Create a MR in the project (edit the README in Web IDE and commit with create MR option checked)
  7. Validate that the pipeline suggestion banner is shown

Validate that the suggest pipeline banner can be disabled

  1. Go back to the CI/CD settings page and uncheck Enable pipeline suggestion banner checkbox
  2. Click on Save changes
  3. Confirm that Enable pipeline suggestion banner checkbox is unchecked
  4. Go back to the MR without a pipeline
  5. 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.

Edited by Eugie Limpin

Merge request reports