repo-standards
repo-standards measures pull-request review size without executing repository code. Its
repository rules are available for review but remain disabled until individually approved
and explicitly activated by a consumer.
After a rule is approved, opt in per run with --enable-rule <rule-id>@<version>. Approval alone
never enables a rule, and the option may be repeated for multiple approved rules.
Run it
Use the current release without installing it:
uvx --from repo-standards repo-standards pull-request size . --base origin/main
For a persistent user installation:
uv tool install repo-standards
repo-standards pull-request size . --base origin/main
Upgrade with uv tool upgrade repo-standards. Automation should pin the package version or
the GitHub Action's full commit SHA.
GitHub Action
The Action measures size only. It enables no repository lint rules and needs no inputs on a
pull_request event.
name: Pull-request size
on:
pull_request:
permissions:
contents: read
jobs:
size:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- uses: sarj-ai/repo-standards@e61d0cb237d796cd84eaeaf6f59d684ad610158d # v4.0.2
The Action emits counted, excluded, and total line counts plus canonical JSON. Tests are recognized across Python, JavaScript/TypeScript, Go, JVM, Android, Xcode/Swift, .NET, Ruby, and Bats conventions. Mark generated or machine-owned artifacts in the trusted base revision:
path/to/generated/** pr-size-excluded
Thresholds, labels, comments, and approval requirements remain consumer policy. Use
pull_request, never pull_request_target; this metric is not a security gate.
Live GitHub evidence
Live governance checks are explicit and read-only. Supply a repository whose token can read metadata, branch protection, rulesets, and Actions settings:
export SARJ_REPO_LINT_GITHUB_TOKEN=...
repo-standards check . \
--github-repository owner/repository \
--require-github-evidence \
--policy sarj \
--format json
Without SARJ_REPO_LINT_GITHUB_TOKEN, the CLI can reuse an authenticated gh session. Live
delivery checks require the selected revision to match the default-branch head.
Safety model
- Repository contents come from one exact Git tree.
- Workflow YAML and API descriptions are parsed as inert data.
- GitHub access is read-only and credentials never come from inspected configuration.
- Missing required evidence produces an inconclusive result rather than a false pass.
- The linter has no autofix or repository mutation mode.
Repositories with production, preview, and development branches can declare and verify continuous hotfix propagation. See Delivery and CI/CD policy for the complete evidence model.
Development
uv sync --locked
uv run pytest
uv run ruff check .
uv run basedpyright
uvx --no-config --isolated --python 3.14 \
--from sarj-standards-bootstrap==2.0.0 \
code-standards check --trust-repository-code
Build the same wheel and source distribution used by publishing:
uv build --no-sources
Releases are reconcilable. The protected workflow independently repairs a missing PyPI publication or GitHub Release from the same verified source revision.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo_standards-4.0.2.tar.gz.
File metadata
- Download URL: repo_standards-4.0.2.tar.gz
- Upload date:
- Size: 109.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9baaebf711bed51525f3868403b5ae490e906902b21e69a5cb9a8e949553bdc2
|
|
| MD5 |
132e9bdb8470c00b9103bbc71bdf5a7d
|
|
| BLAKE2b-256 |
abce4ab99f4e7b8e58420ad75b3014350caf84a987bc1a88bbd8f6b21e0c96dd
|
Provenance
The following attestation bundles were made for repo_standards-4.0.2.tar.gz:
Publisher:
publish.yml on sarj-ai/repo-standards
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_standards-4.0.2.tar.gz -
Subject digest:
9baaebf711bed51525f3868403b5ae490e906902b21e69a5cb9a8e949553bdc2 - Sigstore transparency entry: 2538585220
- Sigstore integration time:
-
Permalink:
sarj-ai/repo-standards@e61d0cb237d796cd84eaeaf6f59d684ad610158d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sarj-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e61d0cb237d796cd84eaeaf6f59d684ad610158d -
Trigger Event:
push
-
Statement type:
File details
Details for the file repo_standards-4.0.2-py3-none-any.whl.
File metadata
- Download URL: repo_standards-4.0.2-py3-none-any.whl
- Upload date:
- Size: 126.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc2f6692f2736a4a0b8b1afbea760910bddfe84e6224ac5034cc4d3ceb9b0d3
|
|
| MD5 |
554206181a63d95d88ca3c7b7629da73
|
|
| BLAKE2b-256 |
25763121c4a31742cc456d7a9f8e954c870a2e73aa11372a6396af736109c0ea
|
Provenance
The following attestation bundles were made for repo_standards-4.0.2-py3-none-any.whl:
Publisher:
publish.yml on sarj-ai/repo-standards
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repo_standards-4.0.2-py3-none-any.whl -
Subject digest:
efc2f6692f2736a4a0b8b1afbea760910bddfe84e6224ac5034cc4d3ceb9b0d3 - Sigstore transparency entry: 2538586044
- Sigstore integration time:
-
Permalink:
sarj-ai/repo-standards@e61d0cb237d796cd84eaeaf6f59d684ad610158d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sarj-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e61d0cb237d796cd84eaeaf6f59d684ad610158d -
Trigger Event:
push
-
Statement type: