Skip to main content

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@f3979c28ca9666d1e9492ba72f0a3c83a89795ba # v5.0.1

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.

Safety model

  • Repository contents come from one exact Git tree.
  • Workflow YAML and API descriptions are parsed as inert data.
  • Missing required evidence produces an inconclusive result rather than a false pass.
  • The linter has no autofix or repository mutation mode.

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

repo_standards-5.0.1.tar.gz (74.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_standards-5.0.1-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

Details for the file repo_standards-5.0.1.tar.gz.

File metadata

  • Download URL: repo_standards-5.0.1.tar.gz
  • Upload date:
  • Size: 74.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repo_standards-5.0.1.tar.gz
Algorithm Hash digest
SHA256 664dec3e41d8f8924ac3e00c14a29f0b5fde3093ac95067b1d99765e37298138
MD5 a8cc79133002689de6306178a163eed3
BLAKE2b-256 6a0437df215a7239769194b4f984e8f13cc538425d74a750c74640da11d089d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_standards-5.0.1.tar.gz:

Publisher: publish.yml on sarj-ai/repo-standards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_standards-5.0.1-py3-none-any.whl.

File metadata

  • Download URL: repo_standards-5.0.1-py3-none-any.whl
  • Upload date:
  • Size: 88.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repo_standards-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 837447ca1cbe9aa544b381a20374d68ab9a361479c90e1549770ba348a101b08
MD5 7632b28f6bc9c85c06fbdb20406be96d
BLAKE2b-256 a5a4d5538fd274b8974ae4972fed02ad07ea3216ee4443ef916cb567415f173e

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_standards-5.0.1-py3-none-any.whl:

Publisher: publish.yml on sarj-ai/repo-standards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

5.1.0

2 files

This release

5.0.1 This release

2 files

5.0.0

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.0.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page