Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamiebuilds/codeowners-enforcer
Enforce CODEOWNERS files on your repo
https://github.com/jamiebuilds/codeowners-enforcer
Last synced: about 2 months ago
JSON representation
Enforce CODEOWNERS files on your repo
- Host: GitHub
- URL: https://github.com/jamiebuilds/codeowners-enforcer
- Owner: jamiebuilds
- License: mit
- Created: 2019-06-26T00:57:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T12:25:33.000Z (almost 3 years ago)
- Last Synced: 2024-07-05T14:31:24.438Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 43.9 KB
- Stars: 43
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# codeowners-enforcer
> Enforce [`CODEOWNERS`](https://help.github.com/en/articles/about-code-owners) files on your repo
- Ensure that every file in your repo is owned by someone.
- Written in Rust for superb performance in even the largest repos.## Install
**With npm:**
```sh
npm install --global codeowners-enforcer
```**With Cargo:**
```sh
cargo install codeowners-enforcer
```## Usage
`codeowners-enforcer` works by finding your `CODEOWNERS` file in a known
location as defined by [GitHub](https://help.github.com/en/articles/about-code-owners).Then it walks through your file tree asserting that every file has a code owner.
If any files don't have a code owner, it will return their relative paths and
exit with `1`:```sh
codeowners-enforcer
``````txt
Oops! Found files without CODEOWNERS!file.one
path/to/file.two
path/to/file.threeFix: Please delete these files, move them, or add owners to them in /path/to/CODEOWNERS
```If you want to return just the file paths, pass `--quiet` or `-q`:
```sh
codeowners-enforcer --quiet
``````txt
one.txt
path/to/two.sh
path/to/three.py
```If you want to ignore files, pass `--ignore ` or `-i`:
```sh
codeowners-enforcer --ignore "path/**/*.py"
``````txt
one.txt
path/to/two.sh
```You can also pass multiple ignores:
```sh
codeowners-enforcer -i "path/**/*.py" -i "path/**/*.sh"
``````txt
one.txt
```If you want to only check certain files, pass ``:
```sh
codeowners-enforcer "**/*.sh" "**/*.py"
``````txt
path/to/two.sh
path/to/three.py
```