Link to the pipelines page after triggering an Auto DevOps pipeline
What does this MR do and why?
Enabling Auto DevOps from Settings > CI/CD queues a pipeline and shows a message telling the user to "go to the Pipelines page for details". That message used to contain a link. The link was removed when the message became a toast, because toasts must not carry actions, and since then users have had to navigate to the Pipelines page themselves — which is the one thing they want to do at that moment.
This MR moves the message from flash[:toast] to flash[:notice] and puts the link back: "A new Auto DevOps pipeline has been created. View pipelines." with View pipelines linking to the project's pipelines page. A notice is the right vehicle here: it is allowed to hold a link, and it stays on screen until dismissed rather than disappearing while the user is reading it.
The link is built with helpers.link_to and injected through safe_format with tag_pair, so the translated string carries only %{link_start} / %{link_end} placeholders and the HTML never goes through translation. The locale/gitlab.pot entry is updated for the new msgid.
References
- Resolves #344614
- The
safe_format+tag_pairpattern is the standard way to place a link inside a translated flash message in this codebase.
Differences
Before: After enabling Auto DevOps, a toast appeared reading "A new Auto DevOps pipeline has been created, go to the Pipelines page for details", with no link. It disappeared on its own, and the user had to find the Pipelines page in the sidebar.
After: A notice appears at the top of the settings page reading "A new Auto DevOps pipeline has been created. View pipelines.", where View pipelines links to the project's pipelines page. The notice stays until dismissed.
How to set up and validate locally
- Open a project that has at least one commit and go to Settings > CI/CD > Auto DevOps.
- Tick Default to Auto DevOps pipeline and select Save changes.
- A notice appears with the new message; View pipelines should take you to
/<group>/<project>/-/pipelines, where the freshly queued pipeline is listed. - Untick the setting, save, and confirm no pipeline-related message appears (unchanged behaviour).
Specs:
bin/rspec spec/controllers/projects/settings/ci_cd_controller_spec.rbThe controller spec now asserts that enabling Auto DevOps sets flash[:notice] rather than flash[:toast], and that the notice contains the message text, the View pipelines label, and an href pointing at project_pipelines_path(project).
MR acceptance checklist
- The change is limited to one controller action, its spec, and the translation catalogue; no database, API, or frontend component changes.
- The link is composed with
safe_formatandtag_pair, so the translated string contains only placeholders and no HTML is passed through translation. -
locale/gitlab.potis updated for the new msgid. - The controller spec covers the flash type, the message text, the link label, and the link target.
-
Changelog: changedtrailer is on the commit. - No documentation change required; the notice is self-explanatory and the docs do not quote the old toast text.
- No feature flag needed; the change is small and restores a link that was previously present.