Skip to main content

Suggest reviewers for your git branch

Project description

git-reviewers

PyPI Python Versions

Build Status Maintainability Code Coverage

Intelligently find code reviewers. See also, git-browse.

Installation

Homebrew (preferred for MacOS)

If you use Homebrew, you can install git-reviewers through the homebrew-albertyw tap:

brew install albertyw/albertyw/git-reviewers

Manual

If you don't use Homebrew, first clone this repository to somewhere on your system (perhaps in your dotfiles repository), then run <REPOSITORY_LOCATION>/install.sh.

After installation, you can modify any default flags for git-reviewers in ~/.gitconfig

Usage

usage: reviewers.py [-h] [-v] [--verbose] [-i IGNORE] [-j JSON] [-c]

Suggest reviewers for your diff. https://github.com/albertyw/git-reviewers

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --verbose             verbose mode
  -i IGNORE, --ignore IGNORE
                        ignore a list of reviewers (comma separated)
  -j JSON, --json JSON  json file to read configs from, overridden by CLI
                        flags
  -c, --copy            Copy the list of reviewers to clipboard, if available
  -b BASE_BRANCH, --base-branch BASE_BRANCH
                        Compare against a base branch (default: master)

Finders

git-reviewers is componsed of a set of strategies for generating lists of reviewers, or Finders. They return a weighted set of reviewers which is then sorted and recommended to you. They include:

  • FindLogReviewers - Generate a list of reviewers based on committers to your committed (but not merged with master) files
  • FindHistoricalReviewers - Generate reviewers based on the repository committers as a whole
  • FindArcCommitReviewers - Generate reviewers based on arc commit messages for files which you have modified on your branch

Configuration

git-reviewers supports reading configuration from a configuration file with the --json flag. The configuration file accepts json with the following fields (all fields optional):

{
    "verbose": false,
    "copy": false,
    "ignore": ["a", "b", "c"],
    "base_branch": "master"
}

git-reviewers will also by default search for and load a json configuration file at ~/.git/reviewers.

Development

pip install -e .[test]
ruff check .
mypy .
coverage run -m unittest
coverage report -m

Publishing

pip install twine
python -m build
twine upload dist/*

Need to also update albertyw/homebrew-albertyw.

Project details


Download files

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

Source Distribution

git_reviewers-0.13.8.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

git_reviewers-0.13.8-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file git_reviewers-0.13.8.tar.gz.

File metadata

  • Download URL: git_reviewers-0.13.8.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for git_reviewers-0.13.8.tar.gz
Algorithm Hash digest
SHA256 0f9f45fc845b12ee6cc8ddc10c92b9383b64c8eac68f8a291ba42909f8652552
MD5 56c5a266eb2a23b763f41b74d677c29a
BLAKE2b-256 0b23e6b2f697c61a0a4972770eee3428e019128bd54617b5d97c90acc1c48d3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_reviewers-0.13.8.tar.gz:

Publisher: publish.yml on albertyw/git-reviewers

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

File details

Details for the file git_reviewers-0.13.8-py3-none-any.whl.

File metadata

  • Download URL: git_reviewers-0.13.8-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for git_reviewers-0.13.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6e47f3760d6cad48f3476209f421f34761219a6e555fe6d7771e017c8ed62dee
MD5 d7cc2dee368af5128eaf42f153fe27be
BLAKE2b-256 511ba4dfbd30cba6473cfd40e1c050a904753086c090fef0878deae6946f7fee

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_reviewers-0.13.8-py3-none-any.whl:

Publisher: publish.yml on albertyw/git-reviewers

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

Supported by

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