chore(docs): render the inputs table with action-docs and run the generators by their package.json scripts - #405
Conversation
File size check0 over a hard cap (fails), 32 warning(s).
Split the file, wrap the line, shorten or exempt the comment, or list the path in 5 managed file(s) skipped; repo-platform owns them. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The action-docs lockfile specifier disagrees with package.json, breaking frozen dependency installation.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: None
What changed in this PR
Replaces the custom inputs reference renderer with action-docs and unifies generated-output checking.
Changes:
- Generates the inputs table from
action.ymlwith overwrite guards. - Runs registered generators through package scripts and checks drift with Git.
- Adds coverage for rendering, generated files, and auto-fix behavior.
| File | Description |
|---|---|
.github/scripts/gen-action-docs.ts |
Removes the custom inputs-table renderer. |
.github/scripts/gen-inputs-table.ts |
Adds guarded action-docs generation. |
.github/scripts/generated.ts |
Registers and runs generator scripts. |
.github/workflows/auto-fix.yml |
Regenerates the inputs table and gaps index. |
action.yml |
Updates generated input descriptions. |
bun.lock |
Adds action-docs dependencies. |
docs/README.md |
Documents the new generator. |
docs/reference/inputs.md |
Contains the generated inputs table. |
package.json |
Adds dependency and build scripts. |
src/flows/inputs.ts |
Consolidates input documentation. |
test/action/action-yml.test.ts |
Updates effective-default assertions. |
test/docs/inputs.test.ts |
Verifies exact ASCII table rendering. |
test/scripts/auto-fix-allowlist.test.ts |
Verifies generator workflow alignment. |
test/scripts/gen-action-docs.test.ts |
Removes obsolete renderer tests. |
test/scripts/gen-inputs-table.test.ts |
Tests marker-region protection. |
test/scripts/generated.test.ts |
Tests script registration and drift detection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
9736116 to
a66ffe3
Compare
|
Fixed in the amended commit: bun.lock now pins action-docs 2.5.1 exactly as package.json does. |
a66ffe3 to
a83fe40
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The build runs library generation before regenerating the upstream-gaps index, preventing new gaps from bootstrapping successfully.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (1)
a83fe40 to
c68f993
Compare
c68f993 to
200c5cf
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The inputs-table guard accepts arbitrary pipe-prefixed content that action-docs can erase.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (1)
200c5cf to
1d81ed8
Compare
1d81ed8 to
d0f45e3
Compare
d0f45e3 to
9d3ff4a
Compare
9d3ff4a to
744707d
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The webhook-events generator is referenced but absent and unregistered, breaking its script and generated-output census.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
744707d to
62e618f
Compare
62e618f to
181d5c7
Compare
181d5c7 to
eaf4d63
Compare
eaf4d63 to
d9265af
Compare
…erators by their package.json scripts The inputs table on docs/reference/inputs.md is now action-docs's rendering of action.yml between its own markers, written by the build:inputs-table script. The in-house table renderer, its link rebasing, and the summary and shownDefault fields of every input declaration go; action.yml's description is the one text the page, the manifest, and the CLI help share. Ten descriptions are reworded so the markdown renderer inside action-docs leaves them verbatim: at most one asterisk per text, no ellipsis, no angle-bracket placeholders. The sections description says what an omitted input means and the affiliation description marks its default like the other discovery filters, since the table no longer has an effective-default column. The page wraps the region in a v-pre div, since the site's Vue renderer would otherwise evaluate the token default's workflow expression and fail the build. build:inputs-table runs .github/scripts/gen-inputs-table.ts, which refuses a marker region holding anything but a rendering's lines in order, naming the first other line: action-docs rewrites the region blind and auto-fix pushes it unreviewed. The region check is structural and regex-free, one split per line: the heading, the header row and its separator, then rows carrying the renderer's cell quoting, so an authored pipe-led line, a table of another width, or a row of bare cells is refused too. test/docs/inputs.test.ts pins the whole region between the markers to the declarations, verbatim and ASCII with no pipe or angle bracket in any description, so a cell the markdown renderer mangled fails CI. The generated-output table in .github/scripts/generated.ts names each generator by its package.json script, so build:check, bun run build, and auto-fix.yml run the one list. The gaps index gets build:gaps-index and runs first in that list, since the bundle, the library, and the later generators import it through src/ and would otherwise build over a stale index when a gap file is added.
d9265af to
7ae3681
Compare


Before
After
How
summaryandshownDefaultfields leaveInputDecl; the action.yml description is what the page, the manifest, and the CLI help all show.build:inputs-tableruns.github/scripts/gen-inputs-table.ts, which callsgenerateActionMarkdownDocson action.yml with the page as its target.## Inputsheading, a blank, the header row, its| --- |separator, one row per input in the renderer's cell shape (backticked name,<p>description,`true`/`false`, backticked default), and a closing blank. The first line off that shape is refused by its page line number: action-docs rewrites the region blind and auto-fix.yml pushes regenerations unreviewed.|and its cell count compared, so a row of thousands of cells costs its length and nothing more; the four-cell regex an earlier revision used backtracked exponentially on such a row (CodeQL alert 104).test/docs/inputs.test.tspins the whole region to the declarations, ASCII only and with no pipe or angle bracket in any description (the two characters the renderer passes through, so a verbatim comparison alone would not notice).<div v-pre>, the same device the secrets page uses, so the site's Vue renderer leaves the token default's workflow expression alone..github/scripts/generated.ts(build, thengit diff --exit-code --statplus an untracked-file check) already exists on main; this change keys its table by script name (bun run <generator>), reworded its failure, and adds two rows:build:gaps-indexfirst (the bundle, the library, and the later generators import the index through src/) andbuild:inputs-tablelast, so build, build:check, and auto-fix.yml run the one list.build:bundle,build:lib, and the schema, docs, and action.yml generators importsrc/upstream-gaps/index.tsthroughsrc/, sobuild:gaps-indexopens thebuildchain, the generated-output table, and auto-fix.yml's rebuild step;test/scripts/generated.test.tspins it ahead of the bundle and the library.Proof
bun test test/scripts/gen-inputs-table.test.ts test/scripts/generated.test.ts test/scripts/auto-fix-allowlist.test.ts test/docs/inputs.test.ts: 21 pass, 0 fail (2 new files); CI runs the suite.bun run build:inputs-tablewith an unchanged page, andbun run build:checkgreen on a clean tree.| authored proseand a two-column| a | b |table between the markers returnnull(three new cases fail on it:Received value must be a string: null); on this guard each is refused naming its line, whether it follows the rows or replaces the table. A four-cell row of bare cells (| Keep this warning | It is authored prose | do not erase | note |) passes a count-only check and is refused here. Two markers on one line are refused naming the line, since action-docs replaces only the opening one of an adjacent pair and leaves three on the page. A 30-row table whose last row is one 5000-cell malformed line is refused naming that row; the check is linear (one split per line) and the test bounds it at 2 s.buildchain (bundle and library before the gaps index) and passes on this one.gen-inputs-table.tspulls in every generator throughgenerated.tswhen the page path comes from there, and imports only action-docs when the path is declared in the script itself; the script now owns it.Line accounting by kind
A library replacement that nets positive lines: the tests gain more than the scripts lose, since two new files pin the region and the guard, the guard checks the table's structure and cell shape rather than a line prefix, action-docs brings its lockfile entries, and the rendered table carries full descriptions where the old one carried one-line summaries.
.github/scripts/*.ts,src/flows/inputs.ts)test/)action.yml,docs/reference/inputs.md)docs/README.md)package.json,bun.lock,auto-fix.yml)Reviewer note
""means unset, and the description names the effective default the same way for every discovery filter (all (default),skip (default,include (default),owner (default)), whichtest/action/action-yml.test.tspins. The two links the Meaning cells carried (permissions, undeclared policy) moved into the page's intro paragraph.<owner>/<name>.ymlbecomesowner/name.yml,...becomesand so on, the quotedage1...becomesa public key starting with age1,"*" matchesbecomesAn asterisk matches, and the six discovery filters end withFails if set outside that discoveryinstead of a secondrepos: "*". Thesectionsdescription now says an omitted input processes every declared section (the old(all declared)cell), andaffiliationmarksowner (default)like the other filters.gen-action-docs.tsstay in-house: action-docs renders markdown from action.yml, it does not write action.yml or derive grants from the sections' declared reads and writes. The region guard ingen-inputs-table.tsstays because action-docs offers no check of what it is about to overwrite; it checks the table's structure by position (heading, header row, separator, rows in the renderer's cell shape), and what a description may hold inside its<p>stays the renderer's own grammar. The render is its ownbuild:inputs-tablescript rather than part ofbuild:docs, becausebuild:docsruns beforebuild:action-docswrites the action.yml it reads.<pre>is now accepted where the in-house grammar refused it. The region test pins the table whole and the guard pins its table shape, and a fence around the markers is not a drift anyone has produced, so it is recorded here rather than built.| \note` |Keep this
| `false` | `""` |`) passes the check and is overwritten. The next rung, requiring the name cell to be an input declared in action.yml, is recorded here rather than built: nothing produces such a line, and the region test pins the table whole.BEGIN_COMMIT_OVERRIDE
chore(docs): render the inputs table with action-docs and run the generators by their package.json scripts
The inputs table on docs/reference/inputs.md is now action-docs's rendering of action.yml between its own markers, written by the build:inputs-table script.
The in-house table renderer, its link rebasing, and the summary and shownDefault fields of every input declaration go; action.yml's description is the one text the page, the manifest, and the CLI help share.
Ten descriptions are reworded so the markdown renderer inside action-docs leaves them verbatim: at most one asterisk per text, no ellipsis, no angle-bracket placeholders.
The sections description says what an omitted input means and the affiliation description marks its default like the other discovery filters, since the table no longer has an effective-default column.
The page wraps the region in a v-pre div, since the site's Vue renderer would otherwise evaluate the token default's workflow expression and fail the build.
build:inputs-table runs .github/scripts/gen-inputs-table.ts, which refuses a marker region holding anything but a rendering's lines in order, naming the first other line: action-docs rewrites the region blind and auto-fix pushes it unreviewed.
The region check is structural and regex-free, one split per line: the heading, the header row and its separator, then rows carrying the renderer's cell quoting, so an authored pipe-led line, a table of another width, or a row of bare cells is refused too.
test/docs/inputs.test.ts pins the whole region between the markers to the declarations, verbatim and ASCII with no pipe or angle bracket in any description, so a cell the markdown renderer mangled fails CI.
The generated-output table in .github/scripts/generated.ts names each generator by its package.json script, so build:check, bun run build, and auto-fix.yml run the one list.
The gaps index gets build:gaps-index and runs first in that list, since the bundle, the library, and the later generators import it through src/ and would otherwise build over a stale index when a gap file is added.
END_COMMIT_OVERRIDE