Skip to content

Fix Ci Catalog Resource relative links in README

Leaminn Ma requested to merge fix-readme-relative-links-ci-catalog-resource into master

What does this MR do and why?

When you view a Ci Catalog Resource details page, relative links are broken and result in a 404 page error. This MR fixes the context of the field that generates the README html so that the links are relative to the project root path.

Resolves #421926 (closed)

How to reproduce

  1. Create a Catalog Resource project.
  2. In the README.md file of that resource, add the following link:
[Test link](README.md)
  1. Now go to the Catalog Resources page at <GROUP>/<PROJECT>/-/ci/catalog/resources/.

Screenshot_2023-10-05_at_2.58.11_PM

  1. Click into the resource that you created in Step 1. Now you will see the details page with its README.md contents. Click Test link. Observe that you are directed to a 404 error page.
Details page Bug
Screenshot_2023-10-05_at_2.59.33_PM Screenshot_2023-10-05_at_3.02.34_PM

How to set up and validate locally

  1. Checkout this branch.
  2. Follow Steps 1-4 in the previous section. Observe that now you get redirected to the correct README.md path.

MR 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 Leaminn Ma

Merge request reports