Skip to content

Commit

Permalink
Add documentation about how to filter pre-commit files (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewring authored Oct 9, 2023
1 parent 6b9b82e commit 814c2ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ Note that GitHub will only respect CODEOWNERS files in a small number of locatio
[the documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location)
for details.
You can further optimize the pre-commit behavior by filtering files processed with hook, like so:
```yaml
hooks:
- id: github-distributed-owners
files: (.*/OWNERS|^.github/CODEOWNERS$)
```
NB: The CODEOWNERS path must be updated if specifying the `--output-file`, as above.

### Installation

To install github-distributed-owners independently, from [crates.io](https://crates.io/crates/github-distributed-owners),
Expand Down

0 comments on commit 814c2ee

Please sign in to comment.