Skip to content

Commit 1692bc5

Browse files
committed
feat: show generated config examples in the docs and check them in CI
generate-config-schema appends each option's generated examples to its `exampleMarkdown`, in a collapsed "Generated output" section, so the docs' Config API Reference shows real plugin output. A new Config Docs Check CI job runs the config-examples tests, regenerates website/config.schema.json and fails if it differs from the committed file. Skill: cops:pr-wrap-up Approved-by: eddeee888 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NyYayEf5cspZ28zZjXzjuc
1 parent 1c545d3 commit 1692bc5

3 files changed

Lines changed: 121 additions & 46 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,33 @@ jobs:
6868
- name: Types Check
6969
run: pnpm types:check
7070

71+
config-docs-check:
72+
name: 📖 Config Docs Check
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
77+
- name: Install pnpm
78+
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
79+
with:
80+
standalone: true
81+
cache: true
82+
- name: Install Node
83+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
84+
with:
85+
node-version: 24
86+
- name: Install packages
87+
run: pnpm install
88+
89+
- name: Config examples cover every option and match plugin output
90+
run: pnpm vitest run packages/utils/config-examples
91+
- name: Config docs schema is up to date
92+
# The docs render each plugin's Config API Reference from this file. Regenerate it with
93+
# `pnpm --filter website generate-config-schema` (see agents/config-options.md).
94+
run: |
95+
pnpm --filter website generate-config-schema
96+
git diff --exit-code -- website/config.schema.json
97+
7198
dev-tests:
7299
name: Validating dev-tests
73100
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)