Add GraphQL field `readme_html` to CiCatalogResource
What does this MR do and why?
Added the readme_html field to ciCatalogResource in GraphQL.
This field returns the content of the catalog resource's README file converted from markdown to HTML.
Resolves #408721 (closed).
How to set up and validate locally
- In the Rails console, run
Feature.enable(:ci_private_catalog_beta)andFeature.enable(:ci_namespace_catalog_experimental). - Create a Catalog Resource with an existing or new Project:
::Ci::Catalog::Resource.create(project: Project.find(<project_id>))
- Ensure your Project contains a
README.mdfile with some GFLM content. Sample content:
# Test Header
**Test Bold Text**
- Go to
http://gdk.test:3000/-/graphql-explorerand run the following query (adjust theprojectPathas necessary):
query getCiCatalogResources {
ciCatalogResources(projectPath: "group-a/project-catalog-resource-2") {
nodes {
id
name
readmeHtml
}
}
}
- Observe that the output shows the
README.mdcontent converted to HTML.
MR 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 MR.
Related to #408721 (closed)
Edited by Leaminn Ma
