mszostok/GitHub CODEOWNERS Validator
GitHub action to ensure the correctness of your CODEOWNERS file.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Feb 20, 2024
- License
- Apache 2.0
Pinned Snippet
uses: mszostok/codeowners-validator@7f3f5e28c6d7b8dfae5731e54ce2272ca384592f # v0.7.4tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github_access_token | The GitHub access token. Instruction for creating a token can be found here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. 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. | no | — |
| github_app_id | Github App ID for authentication. This replaces the GITHUB_ACCESS_TOKEN. Instruction for creating a Github App can be found here: https://github.com/mszostok/codeowners-validator/blob/main/docs/gh-token.md | no | — |
| github_app_installation_id | Github App Installation ID. Required when GITHUB_APP_ID is set. | no | — |
| github_app_private_key | Github App private key in PEM format. Required when GITHUB_APP_ID is set. | no | — |
| github_base_url | The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. Default: https://api.github.com/ | no | — |
| github_upload_url | The GitHub upload URL for uploading files. 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. Default: https://uploads.github.com/ | no | — |
| experimental_checks | The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned. | no | "" |
| checks | The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns,syntax | no | "" |
| repository_path | The repository path in which CODEOWNERS file should be validated. | no | . |
| check_failure_level | Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning | no | — |
| not_owned_checker_skip_patterns | The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2 | no | — |
| owner_checker_repository | The owner and repository name. For example, gh-codeowners/codeowners-samples. Used to check if GitHub team is in the given organization and has permission to the given repository. | no | ${{ github.repository }} |
| owner_checker_ignored_owners | The comma-separated list of owners that should not be validated. Example: @owner1,@owner2,@org/team1,example@email.com. | no | — |
| owner_checker_allow_unowned_patterns | Specifies whether CODEOWNERS may have unowned files. For example, `/infra/oncall-rotator/oncall-config.yml` doesn't have owner and this is not reported. | no | true |
| owner_checker_owners_must_be_teams | Specifies whether only teams are allowed as owners of files. | no | false |
| not_owned_checker_subdirectories | Only check listed subdirectories for CODEOWNERS ownership that don't have owners. | no | — |
| not_owned_checker_trust_workspace | Specifies whether the repository path should be marked as safe. See: https://github.com/actions/checkout/issues/766 | no | true |
Outputs
no outputs