Fix alert block migration when invalid disclaimers are flagged
What does this MR do and why?
I happened to notice the the DETAILS alert type had not migrated on this page: https://new.docs.gitlab.com/ci/components/
The problem was that when we log a warning about invalid DISCLAIMER alerts, we were preventing other alerts from being updated. To fix this, we need to not return an error from updateAlerts
and instead just log the error from the specific alert that's being migrated.
This MR also adds a temporary JS function so that "Edit this page" links will work for index.md
files. This isn't totally related to the migration issue here, but having these working will help for other migration troubleshooting.
Screenshots, screen recordings, or links to review app
before | after |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Run a new migration with fresh content: REMOVE_BEFORE_CLONE=true make clone-docs-project
Visit pages with this problem and compare to the preview site:
- Broken: https://new.docs.gitlab.com/user/clusters/agent/gitops/
- Broken: https://new.docs.gitlab.com/ci/components/
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.