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)
[![Updates](https://pyup.io/repos/github/albertyw/git-reviewers/shield.svg)](https://pyup.io/repos/github/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 -r requirements-test.txt
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/5d/8e/5de8721000341060047dd507e41593f9d04887f8ad9e5b711736d720263e/git_reviewers-0.13.6.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[![Updates](https://pyup.io/repos/github/albertyw/git-reviewers/shield.svg)](https://pyup.io/repos/github/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 -r requirements-test.txt\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.6",
"project_urls": {
"Homepage": "https://github.com/albertyw/git-reviewers"
},
"split_keywords": [
"git",
" code",
" review",
" reviewer",
" log",
" history"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d17dab764afda65c0274f9106acdbb9313e00256b5a3313b47931bf31664db36",
"md5": "6d8c9e918c0adcbdc716206dd5a6f3eb",
"sha256": "ffdeafb1c1768494f2f5938a28b6d2668e6f30e917b2ae6d47cde4b6c82df933"
},
"downloads": -1,
"filename": "git_reviewers-0.13.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d8c9e918c0adcbdc716206dd5a6f3eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7555,
"upload_time": "2024-04-24T06:10:24",
"upload_time_iso_8601": "2024-04-24T06:10:24.947463Z",
"url": "https://files.pythonhosted.org/packages/d1/7d/ab764afda65c0274f9106acdbb9313e00256b5a3313b47931bf31664db36/git_reviewers-0.13.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5d8e5de8721000341060047dd507e41593f9d04887f8ad9e5b711736d720263e",
"md5": "3ed3070c341b77a9a6d1927ce581556e",
"sha256": "55c16ba68b04c319064e5e1c3b9869951bc0feb243d94744b82822d3688816c3"
},
"downloads": -1,
"filename": "git_reviewers-0.13.6.tar.gz",
"has_sig": false,
"md5_digest": "3ed3070c341b77a9a6d1927ce581556e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8413,
"upload_time": "2024-04-24T06:10:27",
"upload_time_iso_8601": "2024-04-24T06:10:27.093686Z",
"url": "https://files.pythonhosted.org/packages/5d/8e/5de8721000341060047dd507e41593f9d04887f8ad9e5b711736d720263e/git_reviewers-0.13.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-24 06:10:27",
"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"
}