Skip to content

Commit

Permalink
Update main README.md (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok committed Apr 16, 2022
1 parent d1be488 commit cfa4033
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
```
Expand Down Expand Up @@ -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]** <br /><br /> Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. |
| avoid-shadowing | **[Avoid Shadowing Checker]** <br /><br /> Reports if entries go from least specific to most specific. Otherwise, earlier entries are completely ignored. |
| Name | Description |
|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| notowned | **[Not Owned File Checker]** <br /><br /> Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. |
| avoid-shadowing | **[Avoid Shadowing Checker]** <br /><br /> Reports if entries go from least specific to most specific. Otherwise, earlier entries are completely ignored. <br /><br />For example:<br />&nbsp;&nbsp;&nbsp;&nbsp; `# First entry`<br />&nbsp;&nbsp;&nbsp;&nbsp; `/build/logs/ @octocat` <br />&nbsp;&nbsp;&nbsp;&nbsp; `# Shadows` <br />&nbsp;&nbsp;&nbsp;&nbsp; `* @s1` <br />&nbsp;&nbsp;&nbsp;&nbsp; `/b*/logs @s5` <br />&nbsp;&nbsp;&nbsp;&nbsp; `# OK` <br />&nbsp;&nbsp;&nbsp;&nbsp; `/b*/other @o1` <br />&nbsp;&nbsp;&nbsp;&nbsp; `/script/* @o2` |

To enable experimental check set `EXPERIMENTAL_CHECKS=notowned` environment variable.

Expand All @@ -127,15 +127,15 @@ Use the following environment variables to configure the application:
| <tt>GITHUB_APP_ID</tt> | | 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) |
| <tt>GITHUB_APP_INSTALLATION_ID</tt> | | Github App Installation ID. Required when `GITHUB_APP_ID` is set. |
| <tt>GITHUB_APP_PRIVATE_KEY</tt> | | Github App private key in PEM format. Required when `GITHUB_APP_ID` is set. |
| <tt>CHECKS</tt> | - | List of checks to be executed. By default, all checks are executed. Possible values: `files`,`owners`,`duppatterns`,`syntax`. |
| <tt>EXPERIMENTAL_CHECKS</tt> | - | The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: `notowned`. |
| <tt>CHECKS</tt> | | List of checks to be executed. By default, all checks are executed. Possible values: `files`,`owners`,`duppatterns`,`syntax`. |
| <tt>EXPERIMENTAL_CHECKS</tt> | | The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: `notowned`. |
| <tt>CHECK_FAILURE_LEVEL</tt> | `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`. |
| <tt>OWNER_CHECKER_REPOSITORY</tt> <b>*</b> | | 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. |
| <tt>OWNER_CHECKER_IGNORED_OWNERS</tt> | `@ghost` | The comma-separated list of owners that should not be validated. Example: `"@owner1,@owner2,@org/team1,example@email.com"`. |
| <tt>OWNER_CHECKER_ALLOW_UNOWNED_PATTERNS</tt> | `true` | Specifies whether CODEOWNERS may have unowned files. For example: <br> <br> `/infra/oncall-rotator/ @sre-team` <br> `/infra/oncall-rotator/oncall-config.yml` <br> <br> The `/infra/oncall-rotator/oncall-config.yml` file is not owned by anyone. |
| <tt>OWNER_CHEKER_OWNERS_MUST_BE_TEAMS</tt> | `false` | Specifies whether only teams are allowed as owners of files. |
| <tt>NOT_OWNED_CHECKER_SKIP_PATTERNS</tt> | - | 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` |
| <tt>NOT_OWNED_CHECKER_SUBDIRECTORIES</tt> | - | 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. |
| <tt>OWNER_CHECKER_OWNERS_MUST_BE_TEAMS</tt> | `false` | Specifies whether only teams are allowed as owners of files. |
| <tt>NOT_OWNED_CHECKER_SKIP_PATTERNS</tt> | | 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` |
| <tt>NOT_OWNED_CHECKER_SUBDIRECTORIES</tt> | | 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. |
| <tt>NOT_OWNED_CHECKER_TRUST_WORKSPACE</tt> | `false` | Specifies whether the repository path should be marked as safe. See: https://github.com/actions/checkout/issues/766. |

<b>*</b> - Required
Expand Down

0 comments on commit cfa4033

Please sign in to comment.