standards-compliance¶
Validates repository standards: markdown formatting, commit messages, PR issue linkage, and repository profile.
Usage¶
- uses: wphillipmoore/standard-actions/actions/standards-compliance@develop
with:
commit-cutoff-sha: ""
skip-sync-check: "false"
Inputs¶
| Name | Required | Default | Description |
|---|---|---|---|
commit-cutoff-sha |
No | "" |
Skip commits at or before this SHA. Repos that adopted conventional commits after their initial history pass their cutoff here. |
skip-sync-check |
No | false |
Skip the shared tooling staleness check. Set to true for repositories that ARE the canonical source for synced scripts (e.g. standard-tooling). |
Permissions¶
contents: read(default forgithub.token)
Behavior¶
- Set up Node.js — Installs Node.js 20 for markdownlint.
- Install markdownlint-cli — Global npm install.
- Fetch base branch — On pull requests, fetches the base branch for commit range linting.
- Validate repository profile — Runs
repo-profile.shto check required repository metadata files. - Validate markdown standards — Runs
markdown-standards.shwith markdownlint against the repository. - Validate commit messages — On pull requests, runs
commit-messages.shto verify conventional commit format for all commits in the PR range. - Validate PR issue linkage — On pull requests, runs
pr-issue-linkage.shto verify the PR body references a GitHub issue. - Validate shared tooling — On PRs targeting
develop, checks whether shared scripts are up to date with the canonical versions in thestandard-toolingpackage.
Examples¶
Basic usage¶
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: wphillipmoore/standard-actions/actions/standards-compliance@develop
With commit cutoff for legacy repos¶
- uses: wphillipmoore/standard-actions/actions/standards-compliance@develop
with:
commit-cutoff-sha: "abc123def456"
Skip sync check for canonical tooling repo¶
- uses: wphillipmoore/standard-actions/actions/standards-compliance@develop
with:
skip-sync-check: "true"
GitHub configuration¶
- Repository profile — The repo must contain the files checked by
repo-profile.sh(typicallyREADME.md,LICENSE,VERSION, and standard documentation files). - Branch protection — Recommended: require this check to pass on
developandmainbranches.