The Codeowners Validator project validates the GitHub CODEOWNERS file.
Local Installation
go get -u github.com/mszostok/codeowners-validator
Usage
Use the following environment variables to configure the application:
Name
Required
Default
Description
REPOSITORY_PATH
Yes
-
The repository path to your repository on your local machine.
GITHUB_ACCESS_TOKEN
No
-
The GitHub access token. Instruction for creating token can be found here. If not provided then validating owners functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur.
It is taken into account only when the GITHUB_BASE_URL is also set. If only the GITHUB_BASE_URL is provided then this parameter defaults to the GITHUB_BASE_URL value.
VALID_OWNER_CHECKER_ORGANIZATION_NAME
Yes
-
The organization name where the repository is created. Used to check if GitHub owner is in the given organization.
Roadmap
Sorted with priority. First - most important.
Possibility to execute validator online. Automatically integrates with your GitHub account and allows you to check any repository online without the need to download and execute binary locally.
Possibility to use the GitHub URL instead of the path to the local repository.
Offline mode - execute all checks which not require internet connection against your local repository
Investigate the Go Plugins. Implement if it will simplify extending this tool with other checks.