Follow-up from "Show an Alert that a user is not using deployments"
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=329583)
</details>
<!--IssueSummary end-->
The following discussion from !57160 should be addressed:
- [ ] @f_caplette started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57160#note_558356177): (+3 comments)
> @afontaine While I am here (sorry about that :smile:) users can have custom file names for their CI configs. So I would advocate for us to use rails `@project.ci_config_path_or_default` instead that can return to us the current path name for CI config files. You could also perhaps instead use `editing_ci_config` which takes the file path and will also check if it ends with that specific extension if someone is seeing a `gitlab-ci.yml` file. I previously had to use it like so:
>
> ```rb
> - is_ci_config_file = defined?(@blob) && defined?(@project) ? editing_ci_config?.to_s : 'false'
> ```
>
> https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42632/diffs
As there are at least 2 places the WebIDE wants to know whether or not we are "editing the gitlab-ci file" (templates bar and alerts), it makes sense to abstract this check out to be easy to use in both places.
issue