Skip to content

GraphQL: Add maintenance_note_html field

Pedro Pombeiro requested to merge pedropombeiro/363308/add-html-field into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds the maintenance_note_html field to RunnerType, so that Markdown content on maintenance_note can be rendered through maintenance_note_html. It will be used notably in Add maintenance notes in runner view (!88060 - merged) to render markdown content in the maintainer_note field.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

Query (choose a ci_runner model that contains a maintenance_note value - can be changed in the PostgreSQL console gdk psql):

{
  runner(id: "gid://gitlab/Ci::Runner/1206") {
    id
    description
    version
    maintenanceNote
    maintenanceNoteHtml
  }
}

Output:

{
  "data": {
    "runner": {
      "id": "gid://gitlab/Ci::Runner/1206",
      "description": "Group test runner",
      "version": "14.11.0~beta.29.gd0c550e3",
      "maintenanceNote": "<h2>Test</h2>",
      "maintenanceNoteHtml": "<h2 dir=\"auto\">&#x000A;<a id=\"user-content-test\" class=\"anchor\" href=\"#test\" aria-hidden=\"true\"></a>Test</h2>"
    }
  }
}

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 Pedro Pombeiro

Merge request reports

Loading