Skip to main content

gerrit-owners-cli

Print Gerrit Code Owners groups for a file.

Installation

python -m pip install gerrit-owners-cli

Requirements

Run the command inside a Git repository with:

  • gitreview.hostname configured in Git config;
  • gitreview.username configured in Git config, unless the credential helper provides it;
  • a Git credential helper that can provide the HTTPS password;
  • a .gitreview file with [gerrit] project=....

The password is read through git credential fill and is never a command-line argument.

Usage

gerrit-owners path/to/file
gerrit-owners path/to/file --branch release/1.0
gerrit-owners path/to/file --json

The default branch is master.

The command prints owner groups and resolves code owner account IDs to names and emails. Inherited and global owner groups included by the API are printed too. Account lookup failures fall back to the account ID.

Use --json to print the complete Gerrit response, including code_owners account IDs and scoring data alongside code_owner_configs.

Example:

Owner groups:
- project-a:team-a
- project-b:team-b

Code owners:
- Example User <user@example.com>

Development

python -m pip install -e '.[dev]'
pytest
ruff check .
python -m build

Releases

The version is derived from Git tags by setuptools-scm. Create a tag such as v0.1.0 and publish a GitHub release. The included workflow publishes the distribution to PyPI through Trusted Publishing.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gerrit_owners_cli-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

gerrit_owners_cli-0.1.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file gerrit_owners_cli-0.1.3.tar.gz.

File metadata

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

File hashes

Hashes for gerrit_owners_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e046fe4d6d3145431f039b0ceee32bff186b595a5ac64088aad91a8e936288aa
MD5 e0674b89d41249cc021197f096921af4
BLAKE2b-256 89d26f8b6a18f320eaaeff7cfffbd3a0b5c967fb996f1fbc0c854921fba49cfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gerrit_owners_cli-0.1.3.tar.gz:

Publisher: build.yml on kotborealis/gerrit-owners-cli

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

File details

Details for the file gerrit_owners_cli-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gerrit_owners_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 80ea41155e8eb1743815a78c240620d7c13c1da2ce64d5f433e29ce295ecbb2d
MD5 5b8b677526a79b6961f2069f7d978b91
BLAKE2b-256 2e74ebeec86d190b3987cd384fba00dde0e581a1f098176065f894f294f6a2f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for gerrit_owners_cli-0.1.3-py3-none-any.whl:

Publisher: build.yml on kotborealis/gerrit-owners-cli

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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page