From cfa4033612462f8a76ddd55f3617a2a8cc713a8c Mon Sep 17 00:00:00 2001 From: Mateusz Szostok Date: Sat, 16 Apr 2022 14:20:32 +0200 Subject: [PATCH] Update main README.md (#153) --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fa04f80..1cf7087 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ env REPOSITORY_PATH="." \ ```yaml - uses: mszostok/codeowners-validator@v0.7.3 with: - checks: "files,owners,duppatterns" - experimental_checks: "notowned" + checks: "files,owners,duppatterns,syntax" + experimental_checks: "notowned,avoid-shadowing" # GitHub access token is required only if the `owners` check is enabled github_access_token: "${{ secrets.OWNERS_VALIDATOR_GITHUB_SECRET }}" ``` @@ -105,10 +105,10 @@ The following checks are enabled by default: The experimental checks are disabled by default: -| Name | Description | -|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| -| notowned | **[Not Owned File Checker]**

Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. | -| avoid-shadowing | **[Avoid Shadowing Checker]**

Reports if entries go from least specific to most specific. Otherwise, earlier entries are completely ignored. | +| Name | Description | +|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| notowned | **[Not Owned File Checker]**

Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. | +| avoid-shadowing | **[Avoid Shadowing Checker]**

Reports if entries go from least specific to most specific. Otherwise, earlier entries are completely ignored.

For example:
     `# First entry`
     `/build/logs/ @octocat`
     `# Shadows`
     `* @s1`
     `/b*/logs @s5`
     `# OK`
     `/b*/other @o1`
     `/script/* @o2` | To enable experimental check set `EXPERIMENTAL_CHECKS=notowned` environment variable. @@ -127,15 +127,15 @@ Use the following environment variables to configure the application: | GITHUB_APP_ID | | Github App ID for authentication. This replaces the `GITHUB_ACCESS_TOKEN`. Instruction for creating a Github App can be found [here](./docs/gh-token.md) | | GITHUB_APP_INSTALLATION_ID | | Github App Installation ID. Required when `GITHUB_APP_ID` is set. | | GITHUB_APP_PRIVATE_KEY | | Github App private key in PEM format. Required when `GITHUB_APP_ID` is set. | -| CHECKS | - | List of checks to be executed. By default, all checks are executed. Possible values: `files`,`owners`,`duppatterns`,`syntax`. | -| EXPERIMENTAL_CHECKS | - | The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: `notowned`. | +| CHECKS | | List of checks to be executed. By default, all checks are executed. Possible values: `files`,`owners`,`duppatterns`,`syntax`. | +| EXPERIMENTAL_CHECKS | | The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: `notowned`. | | CHECK_FAILURE_LEVEL | `warning` | 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`. | | OWNER_CHECKER_REPOSITORY * | | The owner and repository name separated by slash. For example, gh-codeowners/codeowners-samples. Used to check if GitHub owner is in the given organization. | | OWNER_CHECKER_IGNORED_OWNERS | `@ghost` | The comma-separated list of owners that should not be validated. Example: `"@owner1,@owner2,@org/team1,example@email.com"`. | | OWNER_CHECKER_ALLOW_UNOWNED_PATTERNS | `true` | Specifies whether CODEOWNERS may have unowned files. For example:

`/infra/oncall-rotator/ @sre-team`
`/infra/oncall-rotator/oncall-config.yml`

The `/infra/oncall-rotator/oncall-config.yml` file is not owned by anyone. | -| OWNER_CHEKER_OWNERS_MUST_BE_TEAMS | `false` | Specifies whether only teams are allowed as owners of files. | -| 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` | -| NOT_OWNED_CHECKER_SUBDIRECTORIES | - | The comma-separated list of subdirectories to check in `not-owned-checker`. When specified, only files in the listed subdirectories will be checked if they do not have specified owners in CODEOWNERS. | +| OWNER_CHECKER_OWNERS_MUST_BE_TEAMS | `false` | Specifies whether only teams are allowed as owners of files. | +| 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` | +| NOT_OWNED_CHECKER_SUBDIRECTORIES | | The comma-separated list of subdirectories to check in `not-owned-checker`. When specified, only files in the listed subdirectories will be checked if they do not have specified owners in CODEOWNERS. | | NOT_OWNED_CHECKER_TRUST_WORKSPACE | `false` | Specifies whether the repository path should be marked as safe. See: https://github.com/actions/checkout/issues/766. | * - Required