Skip to main content

Keep your github CODEOWNERS file up to date.

Project description

gitown

https://img.shields.io/pypi/v/gitown.svg https://img.shields.io/travis/milin/gitown.svg Documentation Status

Keep your github CODEOWNERS file up to date.

Features

  • Keep your github CODEOWNERS file up to date.

  • If a committer exceeds the ownership_threshold percentage in a file, then the committer is added to the CODEOWNERS file.

  • Default ownership_threshold is set to 25%. You can change it by passing --ownership_threshold

  • Can be used as a pre-commit hook.

  • You need to create a gitownrc file and have a mapping of github emails to github usernames. gitown reads that file and only those users are considered to be added to the CODEOWNERS file.*

It is best used along with pre-commit. You can use it along with pre-commit by adding the following hook in your .pre-commit-config.yaml file.

repos:
- repo:  https://github.com/milin/gitown
  rev: v0.1.0
  hooks:
  - id:  gitown
    args: ['--ownership_threshold=50', '--codeowners_filename=CODEOWNERS']  # Optional

You need to have precommit setup to use this hook.

Install Pre-commit and the commit-msg hook-type.

pip install pre-commit
pre-commit install

History

0.1.0 (2020-11-07)

  • First release on PyPI.

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

gitown-0.1.1.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

gitown-0.1.1-py2.py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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