Add button to return to merge request on pipeline celebration
What does this MR do?
On the 4th step of the pipeline suggest flow, adds a button to return to the merge request.
The pipeline suggest 1st nudge starts on the merge request, so:
-
the 1st nudge was changed to pass the merge request path from the 1st to the 2nd/3rd nudge.
-
the 3rd nudge was changed to set the Merge request path into the cookie set when clicking the Commit Changes button.
-
the 4th nudge then checks for the cookie name instead of just the cookie existence. The merge request path is used for the new button. If they happened to have an old cookie, it links to the project merge request list instead.
-
includes Tracking Event when the new button is clicked
se_category: 'projects:blob:show'
se_action: click_button
se_label: congratulate_first_pipeline
se_property: admin, maintainer, developer, or owner
se_value: 20
Closes https://gitlab.com/gitlab-org/gitlab/-/issues/223110
Closes https://gitlab.com/gitlab-org/gitlab/-/issues/230497
Screenshots
Event firing after clicking new "Back to merge request" button:
Steps to reproduce
- Start from an open MR with no Pipelines, and follow the "Show me how to add a pipeline" button
- Clicking the link takes you to the new file editor, and the Popover is not open until clicking the dropdown
- Choose a CI template from the drop-down list
- After applying the template, click the "Commit Changes" button
- You will be taken the the pipeline celebration window but may need to reload the URL by adding ?force_experiment=suggest_pipeline to the URL
(pipeline celebration screenshot above is without the new button)
Example Project Links
http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/new/better-comment-the-hooks?commit_message=Add+.gitlab-ci.yml&file_name=.gitlab-ci.yml&suggest_gitlab_ci_yml=true&force_experiment=suggest_pipeline to choose a template and Commit Change to upload the file.
After the file is successfully committed and uploaded, reload the URL by adding ?force_experiment=suggest_pipeline to the URL: http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/blob/better-comment-the-hooks/.gitlab-ci.yml?force_experiment=suggest_pipeline