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.2.tar.gz (7.2 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.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gerrit_owners_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 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.2.tar.gz
Algorithm Hash digest
SHA256 6ad2f4318923072d71b0542096953fd23afcbc242c0e7e94916afd7fb24612c5
MD5 f5f0a6b6470bbe796de3f8d645c53f9c
BLAKE2b-256 9b1a6671b019c69ea62c65800e01b9579a72e12076f3c0cade6d098da271df40

See more details on using hashes here.

Provenance

The following attestation bundles were made for gerrit_owners_cli-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gerrit_owners_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8bba2aee3350c20dc4dd0cfa47bee42f8a71ecd8d8111afe6dfca2c82921b85e
MD5 a9407d9b0e0958015436f12b8904f477
BLAKE2b-256 2ee7d610d6d088c5df116406386fbe7a751398ddc7d74300e7f121f93a28c53c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gerrit_owners_cli-0.1.2-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

0.1.3

2 files

This release

0.1.2 This release

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