Skip to content

Open Pipeline Editor on current branch when previewing CI config file

What does this MR do and why?

When previewing a gitlab config file in the repository view, you can click on the "Pipeline Editor" button to open it in the Pipeline editor section. If you were previewing the file in a branch other than main, then it would not carry over when landing in the section. This MR changes that.

Screenshots or screen recordings

Screen_Recording_2021-10-25_at_2.37.38_PM

How to set up and validate locally

  1. Turn on pipeline_editor_branch_switcher feature flag
  2. Go in a project with a CI config
  3. In the repository view, click to view your Ci config file (AKA .gitlab-ci.yml)
  4. Change which branch you are on (anything but main)
  5. Click on "Pipeline Editor" button
  6. Notice that you land in the Pipeline editor section on the correct branch

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #342018 (closed)

Edited by Frédéric Caplette

Merge request reports

Loading