From b9212138e468b3e1df02b977d59823a470478599 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Sat, 14 Mar 2026 01:11:23 -0400 Subject: [PATCH 1/3] feat(ci): add org-default markdownlint config with workflow fallback (claude) --- .github/workflows/_markdown-lint.yml | 8 +++++++- configs/.markdownlint-cli2.yaml | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 configs/.markdownlint-cli2.yaml diff --git a/.github/workflows/_markdown-lint.yml b/.github/workflows/_markdown-lint.yml index 6412de9..735d0fb 100644 --- a/.github/workflows/_markdown-lint.yml +++ b/.github/workflows/_markdown-lint.yml @@ -1,5 +1,5 @@ # Reusable: Markdown Lint -# Generic markdown linting — uses the calling repo's own markdownlint config. +# Uses the calling repo's own markdownlint config, falling back to org defaults. name: _markdown-lint on: @@ -20,6 +20,12 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: Apply org-default markdownlint config + if: hashFiles('.markdownlint-cli2.yaml', '.markdownlint-cli2.cjs', '.markdownlint-cli2.mjs', '.markdownlint.yaml', '.markdownlint.json', '.markdownlint.jsonc', '.markdownlint.yml') == '' + run: | + curl -sSfL "https://raw.githubusercontent.com/${{ github.repository_owner }}/.github/main/configs/.markdownlint-cli2.yaml" \ + -o .markdownlint-cli2.yaml + - name: Run markdownlint uses: DavidAnson/markdownlint-cli2-action@v22 with: diff --git a/configs/.markdownlint-cli2.yaml b/configs/.markdownlint-cli2.yaml new file mode 100644 index 0000000..6250438 --- /dev/null +++ b/configs/.markdownlint-cli2.yaml @@ -0,0 +1,15 @@ +# Organization-wide markdownlint defaults +# Repos inherit this via the _markdown-lint.yml reusable workflow. +# To override: add a .markdownlint-cli2.yaml to your repo root. +config: + # Allow duplicate headings in different sections (standard for changelogs) + MD024: + siblings_only: true + +# Per-file overrides +overrides: + - files: + - "CHANGELOG.md" + config: + # release-please generates long lines with PR links + MD013: false From dda50126d0c723e008acd772443428879ed636c3 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Sat, 14 Mar 2026 09:03:21 -0400 Subject: [PATCH 2/3] fix(ci): expand hashFiles check and add curl retry (claude) --- .github/workflows/_markdown-lint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_markdown-lint.yml b/.github/workflows/_markdown-lint.yml index 735d0fb..b110a0e 100644 --- a/.github/workflows/_markdown-lint.yml +++ b/.github/workflows/_markdown-lint.yml @@ -21,9 +21,10 @@ jobs: uses: actions/checkout@v6 - name: Apply org-default markdownlint config - if: hashFiles('.markdownlint-cli2.yaml', '.markdownlint-cli2.cjs', '.markdownlint-cli2.mjs', '.markdownlint.yaml', '.markdownlint.json', '.markdownlint.jsonc', '.markdownlint.yml') == '' + if: hashFiles('.markdownlint-cli2.jsonc', '.markdownlint-cli2.yaml', '.markdownlint-cli2.cjs', '.markdownlint-cli2.mjs', '.markdownlint.jsonc', '.markdownlint.json', '.markdownlint.yaml', '.markdownlint.yml', '.markdownlint.cjs', '.markdownlint.mjs') == '' run: | - curl -sSfL "https://raw.githubusercontent.com/${{ github.repository_owner }}/.github/main/configs/.markdownlint-cli2.yaml" \ + curl -sSfL --retry 3 --retry-connrefused \ + "https://raw.githubusercontent.com/${{ github.repository_owner }}/.github/main/configs/.markdownlint-cli2.yaml" \ -o .markdownlint-cli2.yaml - name: Run markdownlint From 4c450cd4ad81404763832b7b993c1021ed115975 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Sat, 14 Mar 2026 11:43:07 -0400 Subject: [PATCH 3/3] feat(ci): add org-wide MD013 line length defaults Set line_length to 160 (strict), with 80 for code blocks and headings. Tables checked at 160 like general content. CHANGELOG.md remains exempt. (claude) --- configs/.markdownlint-cli2.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configs/.markdownlint-cli2.yaml b/configs/.markdownlint-cli2.yaml index 6250438..d854b0e 100644 --- a/configs/.markdownlint-cli2.yaml +++ b/configs/.markdownlint-cli2.yaml @@ -2,6 +2,13 @@ # Repos inherit this via the _markdown-lint.yml reusable workflow. # To override: add a .markdownlint-cli2.yaml to your repo root. config: + MD013: + line_length: 160 + heading_line_length: 80 + code_block_line_length: 80 + tables: true + strict: true + # Allow duplicate headings in different sections (standard for changelogs) MD024: siblings_only: true