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.hostnameconfigured in Git config;gitreview.usernameconfigured in Git config, unless the credential helper provides it;- a Git credential helper that can provide the HTTPS password;
- a
.gitreviewfile 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.
Metadata
Release files for gerrit-owners-cli 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gerrit_owners_cli-0.1.3.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gerrit_owners_cli-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / gerrit_owners_cli-0.1.3.tar.gz
| Download URL | gerrit_owners_cli-0.1.3.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e046fe4d6d3145431f039b0ceee32bff186b595a5ac64088aad91a8e936288aa
|
|
BLAKE2b-256 checksum How to use checksums |
89d26f8b6a18f320eaaeff7cfffbd3a0b5c967fb996f1fbc0c854921fba49cfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / gerrit_owners_cli-0.1.3-py3-none-any.whl
| Download URL | gerrit_owners_cli-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80ea41155e8eb1743815a78c240620d7c13c1da2ce64d5f433e29ce295ecbb2d
|
|
BLAKE2b-256 checksum How to use checksums |
2e74ebeec86d190b3987cd384fba00dde0e581a1f098176065f894f294f6a2f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency log