chore(docs): add governance pilot fixtures to exercise lint rules#3576
Closed
morningman wants to merge 1 commit intoapache:masterfrom
Closed
chore(docs): add governance pilot fixtures to exercise lint rules#3576morningman wants to merge 1 commit intoapache:masterfrom
morningman wants to merge 1 commit intoapache:masterfrom
Conversation
9aae00d to
fcbe0c5
Compare
Contributor
Author
|
/review |
fcbe0c5 to
6f2b76f
Compare
Contributor
Author
|
/review-docs |
6f2b76f to
2288afd
Compare
Contributor
Author
|
/review-docs |
Docs AI ReviewChanged-file docs review results for this PR. Summary
Findings to fix
57 additional findings are not shown. Check the docs governance job output for the full list. High-risk scope
Sync groups to verify
Next steps
AI review output is advisory. Deterministic governance CI remains the blocking signal. |
Fixture PR to verify each docs governance check family end-to-end:
front matter, markdown structure, sidebar orphan, link gate, SEO/GEO,
SQL function doc quality, feature doc quality, and i18n/version sync.
Locally triggers 31 distinct rules, including the blocking
changed-only internal link gate (link-missing-target and
link-missing-anchor). Fixtures live under docs/_governance-pilot/ plus
one SQL function fixture under docs/sql-manual/sql-functions/... A
single-line fixture edit is added to an existing zh-CN FAQ to exercise
i18n-sync-source-counterpart; that line is a marked HTML comment.
Not intended to merge as-is; the author will review before pushing.
fix(ci): post docs AI review comment via REST to avoid GraphQL permission
The first-time comment path used gh pr comment, which internally
issues the GraphQL addComment mutation and requires
pull-requests: write. The job only grants pull-requests: read (plus
issues: write for the existing update path), so the first comment
failed with "Resource not accessible by integration (addComment)".
Replace gh pr comment with gh api POST against the issues/{number}/comments
REST endpoint, which accepts the issues: write scope the job already
grants, and mirrors the PATCH path used when a previous comment exists.
fix(ci): split Docs AI Review comment into workflow_run workflow
Pull requests from forks run pull_request workflows with a read-only
GITHUB_TOKEN regardless of declared permissions, so the inline comment
step could never post on fork PRs and returned 403 on both GraphQL
and REST comment endpoints. Split the flow following the GitHub
workflow_run pattern:
- docs-ai-review.yml (pull_request trigger) now only prepares the
packet and uploads it as an artifact, together with a pr-metadata
JSON describing the PR number, head SHA, base SHA and trigger name.
It no longer tries to comment.
- docs-ai-review-comment.yml (workflow_run trigger on the first
workflow) downloads the artifact from the completed run, parses the
metadata, and upserts the advisory comment via REST. Because
workflow_run runs in the base-repo context, its GITHUB_TOKEN honors
the declared issues: write permission even for fork-originated PRs.
The comment workflow does not check out or execute any code from the
fork. It only consumes the prebuilt packet and metadata JSON, which
avoids the security footgun usually associated with giving write
permissions to fork-triggered runs.
2288afd to
7a86086
Compare
Contributor
Author
|
/review-docs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixture PR to verify each docs governance check family end-to-end: front matter, markdown structure, sidebar orphan, link gate, SEO/GEO, SQL function doc quality, feature doc quality, and i18n/version sync.
Locally triggers 31 distinct rules, including the blocking changed-only internal link gate (link-missing-target and link-missing-anchor). Fixtures live under docs/_governance-pilot/ plus one SQL function fixture under docs/sql-manual/sql-functions/... A single-line fixture edit is added to an existing zh-CN FAQ to exercise i18n-sync-source-counterpart; that line is a marked HTML comment.
Not intended to merge as-is; the author will review before pushing.