From 8f46431c7480780b62f3edf7edb769647ff9615a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 06:21:09 +0000 Subject: [PATCH 1/3] Initial plan From 00c1c83af0b38adccca76e52ec311345d709d9e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 06:26:40 +0000 Subject: [PATCH 2/3] fix: disable MD060 rule in helm-docs default markdownlint config MD060 (table-column-style) conflicts with Prettier's table formatting and cannot be auto-fixed. This rule requires aligned table pipes, but Prettier removes alignment padding when formatting markdown. Co-authored-by: neilime <314088+neilime@users.noreply.github.com> --- actions/helm/generate-docs/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/helm/generate-docs/action.yml b/actions/helm/generate-docs/action.yml index a456ec22..93cc0e54 100644 --- a/actions/helm/generate-docs/action.yml +++ b/actions/helm/generate-docs/action.yml @@ -115,6 +115,9 @@ runs: const defaultConfig = { "default": true, "line-length": false, + // Disable MD060 because Prettier formats tables without aligned pipes, + // and markdownlint cannot auto-fix this rule + "MD060": false, "outputFormatters": [ [ "markdownlint-cli2-formatter-template", From 22d2fb09fbbe6b59b47c9e234216eecfbfeca26a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 06:44:04 +0000 Subject: [PATCH 3/3] fix: reorder markdown processing to run prettier after markdownlint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the order of steps in generate-docs action: - Old order: textlint → prettier → markdownlint --fix → validate - New order: textlint → markdownlint --fix → prettier → validate This ensures prettier's table formatting (with aligned columns) is the final result before validation, avoiding MD060 lint errors. Also added ignoreReturnCode: true to markdownlint fix step so it doesn't fail on unfixable issues before prettier can format. Co-authored-by: neilime <314088+neilime@users.noreply.github.com> --- actions/helm/generate-docs/action.yml | 40 +++++++++++++-------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/actions/helm/generate-docs/action.yml b/actions/helm/generate-docs/action.yml index 93cc0e54..6ecfc0c4 100644 --- a/actions/helm/generate-docs/action.yml +++ b/actions/helm/generate-docs/action.yml @@ -115,9 +115,6 @@ runs: const defaultConfig = { "default": true, "line-length": false, - // Disable MD060 because Prettier formats tables without aligned pipes, - // and markdownlint cannot auto-fix this rule - "MD060": false, "outputFormatters": [ [ "markdownlint-cli2-formatter-template", @@ -176,6 +173,25 @@ runs: cwd: process.env.WORKING_DIRECTORY, }); + - name: Lint Fix markdown files + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + NODE_PATH: ${{ github.action_path }}/node_modules + WORKING_DIRECTORY: ${{ steps.prepare-variables.outputs.working-directory }} + FILES_PATTERN: ${{ steps.prepare-variables.outputs.files-pattern }} + CONFIG_PATH: ${{ steps.prepare-variables.outputs.markdownlint-config-path }} + with: + script: | + await exec.exec('npx', [ + 'markdownlint-cli2', + '--fix', + '--config', process.env.CONFIG_PATH, + process.env.FILES_PATTERN, + ], { + cwd: process.env.WORKING_DIRECTORY, + ignoreReturnCode: true, + }); + - name: Cache prettier id: cache-prettier uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 @@ -208,24 +224,6 @@ runs: cwd: process.env.WORKING_DIRECTORY, }); - - name: Lint Fix markdown files - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - env: - NODE_PATH: ${{ github.action_path }}/node_modules - WORKING_DIRECTORY: ${{ steps.prepare-variables.outputs.working-directory }} - FILES_PATTERN: ${{ steps.prepare-variables.outputs.files-pattern }} - CONFIG_PATH: ${{ steps.prepare-variables.outputs.markdownlint-config-path }} - with: - script: | - await exec.exec('npx', [ - 'markdownlint-cli2', - '--fix', - '--config', process.env.CONFIG_PATH, - process.env.FILES_PATTERN, - ], { - cwd: process.env.WORKING_DIRECTORY, - }); - - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 if: inputs.github-app-id id: generate-token