Skip to content

Make 'Cancel' in CI/CD editor redirect to project

What does this MR do?

This makes the Cancel button in the new CI/CD editor redirect to the project home instead of resetting the form. The reason is that while a reset is nice, the Cancel button should cancel the editing like on other create/edit pages (merge requests, issues, releases, ...) rather than resetting the form.

Related to #331916 (closed)

Steps to test

  1. Go to a project
  2. Go to the CI/CD editor (/-/ci/editor)
    • Sidebar: CI/CD -> Editor
  3. optional if there is no .gitlab-ci.yml on the default branch: click on Create new CI/CD pipeline
  4. Enter some characters in the code area
  5. Click on the Cancel button at the bottom of the page
  6. See that you are redirected to the project
  • before: editor is reset to the last state (empty if there is no CI config)

Screenshots (strongly suggested)

Affected component (no visual changes, button red-outlined)

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Kev

Merge request reports