mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
211 stars 48 forks source link

Rename to codeowners, extend configuration capabilities, add pre-commit-hook support #199

Open bobertrublik opened 1 year ago

bobertrublik commented 1 year ago

Description

This PR changes a few issues at once which I found while getting to know the project. In order to allow the use of codeowners-validator as pre-commit hook a lot of changes were necessary. As described in https://github.com/mszostok/codeowners-validator/issues/140 pre-commit hooks do not really work with env variables and flags are currently not supported by the code base. Additionally in https://github.com/mszostok/codeowners-validator/issues/116 it was considered to rename codeowners-validator to codeowners in order to make the project more future proof for further functions.

Changes proposed in this pull request:

Related issue(s)

Additional information

I fixed most of the integration tests but can't run the ones which require an API key. The other tests run fine.

One issue I wasn't able to fix is in the commit https://github.com/mszostok/codeowners-validator/commit/c372b63180f5b1c031c8e86ca38aed09063d4cbc. I have no idea how to add a custom type as flag since I need to convert it somewhere. I would appreciate help there :) Other than that it's very possible I made some errors or mistakes which could be solved more elegantly. Feedback is very welcome!

This PR also includes #197.

bobertrublik commented 2 months ago

I tried to rebase and I ran into a lot of conflicts. I can fix them but first I wanted to ask, if you'd prefer to make this PR perhaps a little smaller? I can drop the renaming to codeowners if you prefer. Also I'd still have to take a look how to accept custom types as a flag. 🙂