The connector-docs-verify.yaml workflow runs a standalone
docs/connector.mdx validation check for connector repositories.
This workflow is meant to be safe as a required status check on every connector pull request:
- It checks out this workflow repository at the exact workflow commit.
- It checks whether
docs/connector.mdxchanged in the pull request. - It installs the checked-in MDX validator dependencies with npm lifecycle scripts disabled.
- It checks out the caller repository at the requested ref with persisted credentials disabled.
- If the file is unchanged, the job exits successfully.
- If the file changed, the job validates that the file still exists and passes MDX safety checks.
The required check context is stable when the caller job id is
connector-docs:
connector-docs / validate
The validator compiles MDX without evaluating PR content and rejects unsafe constructs by walking the MDX AST before compilation:
- empty documentation
- NUL bytes or byte-order marks
- MDX imports or exports outside code fences
- MDX expression braces outside code fences
- event-handler attributes
- dangerous URL schemes after simple entity decoding
- unsupported JSX components
Allowed JSX components:
CardCheckFrameIconInfoNoteStepStepsTabTabsTipWarning
Keep the allowlist aligned with the connector registry renderer and server-side documentation validators.
name: Connector Docs
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
jobs:
connector-docs:
uses: ConductorOne/github-workflows/.github/workflows/connector-docs-verify.yaml@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}Do not add workflow-level paths filters to the caller workflow when this
check is required by branch rules. A required check that never runs leaves pull
requests stuck waiting.
The workflow itself handles the path check and reports success when
docs/connector.mdx is unchanged.
Use a staged rollout:
- Merge this workflow and update the shared workflow ref used by connector
repos, such as the
v4tag, so callers can resolveconnector-docs-verify.yaml. - Add the caller workflow to connector repos without requiring the status check yet.
- Confirm
connector-docs / validateappears and passes on both docs and non-doc pull requests. - Require
connector-docs / validatein branch rules only after the check is present on targeted repos.
The existing verify.yaml docs job reuses the same MDX validator for
compatibility. Use this standalone workflow as the required docs safety gate
because it always reports the connector-docs / validate check that branch
rules target.