Skip to content

Fix alert block migration when invalid disclaimers are flagged

Sarah German requested to merge alert-block-fixes into main

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
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. 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:

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.

Edited by Sarah German

Merge request reports

Loading