git-reviewers
=============
[![PyPI](https://img.shields.io/pypi/v/git-reviewers.svg)](https://pypi.org/project/git-reviewers/)
[![Python Versions](https://img.shields.io/pypi/pyversions/git-reviewers.svg)](https://pypi.org/project/git-reviewers/)
[![Build Status](https://drone.albertyw.com/api/badges/albertyw/git-reviewers/status.svg)](https://drone.albertyw.com/albertyw/git-reviewers)
[![Maintainability](https://api.codeclimate.com/v1/badges/58c63ec99d395f0f8df6/maintainability)](https://codeclimate.com/github/albertyw/git-reviewers/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/58c63ec99d395f0f8df6/test_coverage)](https://codeclimate.com/github/albertyw/git-reviewers/test_coverage)
Intelligently find code reviewers.
See also, [git-browse](https://github.com/albertyw/git-browse).
Installation
------------
### Homebrew (preferred for MacOS)
If you use Homebrew, you can install git-reviewers through the
[homebrew-albertyw tap](https://github.com/albertyw/homebrew-albertyw):
```bash
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](https://github.com/albertyw/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):
```json
{
"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
-----------
```bash
pip install -e .[test]
ruff check .
mypy .
coverage run -m unittest
coverage report -m
```
Publishing
----------
```bash
pip install twine
python -m build
twine upload dist/*
```
Need to also update [albertyw/homebrew-albertyw](https://github.com/albertyw/homebrew-albertyw).
Raw data
{
"_id": null,
"home_page": null,
"name": "git-reviewers",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "git, code, review, reviewer, log, history",
"author": null,
"author_email": "Albert Wang <git@albertyw.com>",
"download_url": "https://files.pythonhosted.org/packages/16/bb/1f64be7690f80036239e54cd813a6f27401a7c487a1a13554ffc26f54cf5/git_reviewers-0.13.7.tar.gz",
"platform": null,
"description": "git-reviewers\n=============\n\n[![PyPI](https://img.shields.io/pypi/v/git-reviewers.svg)](https://pypi.org/project/git-reviewers/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/git-reviewers.svg)](https://pypi.org/project/git-reviewers/)\n\n\n[![Build Status](https://drone.albertyw.com/api/badges/albertyw/git-reviewers/status.svg)](https://drone.albertyw.com/albertyw/git-reviewers)\n[![Maintainability](https://api.codeclimate.com/v1/badges/58c63ec99d395f0f8df6/maintainability)](https://codeclimate.com/github/albertyw/git-reviewers/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/58c63ec99d395f0f8df6/test_coverage)](https://codeclimate.com/github/albertyw/git-reviewers/test_coverage)\n\nIntelligently find code reviewers.\nSee also, [git-browse](https://github.com/albertyw/git-browse).\n\nInstallation\n------------\n\n### Homebrew (preferred for MacOS)\n\nIf you use Homebrew, you can install git-reviewers through the\n[homebrew-albertyw tap](https://github.com/albertyw/homebrew-albertyw):\n\n\n```bash\nbrew install albertyw/albertyw/git-reviewers\n```\n\n### Manual\n\nIf you don't use Homebrew, first clone this repository to somewhere on your system\n(perhaps in your [dotfiles](https://github.com/albertyw/dotfiles)\nrepository), then run `<REPOSITORY_LOCATION>/install.sh`.\n\nAfter installation, you can modify any default flags for git-reviewers\nin `~/.gitconfig`\n\nUsage\n-----\n\n```\nusage: reviewers.py [-h] [-v] [--verbose] [-i IGNORE] [-j JSON] [-c]\n\nSuggest reviewers for your diff. https://github.com/albertyw/git-reviewers\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n --verbose verbose mode\n -i IGNORE, --ignore IGNORE\n ignore a list of reviewers (comma separated)\n -j JSON, --json JSON json file to read configs from, overridden by CLI\n flags\n -c, --copy Copy the list of reviewers to clipboard, if available\n -b BASE_BRANCH, --base-branch BASE_BRANCH\n Compare against a base branch (default: master)\n```\n\nFinders\n-------\n\n`git-reviewers` is componsed of a set of strategies for generating lists of\nreviewers, or Finders. They return a weighted set of reviewers which is then\nsorted and recommended to you. They include:\n\n- `FindLogReviewers` - Generate a list of reviewers based on committers to\n your committed (but not merged with master) files\n- `FindHistoricalReviewers` - Generate reviewers based on the repository\n committers as a whole\n- `FindArcCommitReviewers` - Generate reviewers based on arc commit messages\n for files which you have modified on your branch\n\nConfiguration\n-------------\n\n`git-reviewers` supports reading configuration from a configuration file\nwith the `--json` flag. The configuration file accepts json with the\nfollowing fields (all fields optional):\n\n```json\n{\n \"verbose\": false,\n \"copy\": false,\n \"ignore\": [\"a\", \"b\", \"c\"],\n \"base_branch\": \"master\"\n}\n```\n\n`git-reviewers` will also by default search for and load a json\nconfiguration file at `~/.git/reviewers`.\n\nDevelopment\n-----------\n\n```bash\npip install -e .[test]\nruff check .\nmypy .\ncoverage run -m unittest\ncoverage report -m\n```\n\nPublishing\n----------\n\n```bash\npip install twine\npython -m build\ntwine upload dist/*\n```\n\nNeed to also update [albertyw/homebrew-albertyw](https://github.com/albertyw/homebrew-albertyw).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Suggest reviewers for your git branch",
"version": "0.13.7",
"project_urls": {
"Homepage": "https://github.com/albertyw/git-reviewers"
},
"split_keywords": [
"git",
" code",
" review",
" reviewer",
" log",
" history"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "808391d8849928028a2eb2d877139c1a4eeacf6a57c6eb1e4ef84a586916cf23",
"md5": "af832250a5efb76c97d61710767023d1",
"sha256": "8327dd23e8996807765c98e1dd2394270e525567bae573a532b3dd0ad560fa21"
},
"downloads": -1,
"filename": "git_reviewers-0.13.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af832250a5efb76c97d61710767023d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7613,
"upload_time": "2024-11-11T01:12:50",
"upload_time_iso_8601": "2024-11-11T01:12:50.761332Z",
"url": "https://files.pythonhosted.org/packages/80/83/91d8849928028a2eb2d877139c1a4eeacf6a57c6eb1e4ef84a586916cf23/git_reviewers-0.13.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "16bb1f64be7690f80036239e54cd813a6f27401a7c487a1a13554ffc26f54cf5",
"md5": "5cf516c5e6be94d394013b56745c3778",
"sha256": "2ca6b97a18e27fd631483a2da1c97ef189c5a05bece16247497e3efac1831e15"
},
"downloads": -1,
"filename": "git_reviewers-0.13.7.tar.gz",
"has_sig": false,
"md5_digest": "5cf516c5e6be94d394013b56745c3778",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8564,
"upload_time": "2024-11-11T01:12:52",
"upload_time_iso_8601": "2024-11-11T01:12:52.394699Z",
"url": "https://files.pythonhosted.org/packages/16/bb/1f64be7690f80036239e54cd813a6f27401a7c487a1a13554ffc26f54cf5/git_reviewers-0.13.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 01:12:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "albertyw",
"github_project": "git-reviewers",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "git-reviewers"
}