You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| duppatterns |**[Duplicated Pattern Checker]** <br /><br /> Reports if CODEOWNERS file contain duplicated lines with the same file pattern. |
57
-
| files |**[File Exist Checker]** <br /><br /> Reports if CODEOWNERS file contain lines with the file pattern that do not exist in a given repository. |
58
-
| owners |**[Valid Owner Checker]** <br /><br /> Reports if CODEOWNERS file contain invalid owners definition. Allowed owner syntax: `@username`, `@org/team-name` or `user@example.com` <br /> _source: https://help.github.com/articles/about-code-owners/#codeowners-syntax_. <br /> <br /> **Checks:** <br /> 	 1. Check if the owner's definition is valid (is either a GitHub user name, an organization team name or an email address). <br /><br /> 2. Check if a GitHub owner has a GitHub account <br /><br /> 3. Check if a GitHub owner is in a given organization <br /> <br />4. Check if an organization team exists |
| notowned |**[Not Owned File Checker]** <br /><br /> Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. |
66
+
```bash
67
+
export GH_TOKEN=<your_token>
68
+
env REPOSITORY_PATH="." \
69
+
GITHUB_ACCESS_TOKEN="$GH_TOKEN" \
70
+
EXPERIMENTAL_CHECKS="notowned" \
71
+
OWNER_CHECKER_REPOSITORY="org-name/rep-name" \
72
+
codeowners-validator
73
+
```
65
74
66
-
To enable experimental check set `EXPERIMENTAL_CHECKS=notowned` environment variable.
75
+
#### GitHub Action
67
76
68
-
Check the [Usage](#usage) section for more info on how to enable and configure given checks.
77
+
Coming soon 😎 Stay tuned!
69
78
70
-
## Usage
79
+
80
+
Check the [Configuration](#configuration) section for more info on how to enable and configure given checks.
81
+
82
+
## Configuration
71
83
72
84
Use the following environment variables to configure the application:
73
85
@@ -80,11 +92,31 @@ Use the following environment variables to configure the application:
80
92
| <tt>CHECKS</tt>| - | The list of checks that will be executed. By default, all checks are executed. Possible values: `files`,`owners`,`duppatterns`|
81
93
| <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`.|
82
94
| <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`. |
83
-
| <tt>OWNER_CHECKER_ORGANIZATION_NAME</tt> <b>*</b>|| The organization name where the repository is created. Used to check if GitHub owner is in the given organization. |
95
+
| <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. |
84
96
| <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`|
| duppatterns |**[Duplicated Pattern Checker]** <br /><br /> Reports if CODEOWNERS file contain duplicated lines with the same file pattern. |
107
+
| files |**[File Exist Checker]** <br /><br /> Reports if CODEOWNERS file contain lines with the file pattern that do not exist in a given repository. |
108
+
| owners |**[Valid Owner Checker]** <br /><br /> Reports if CODEOWNERS file contain invalid owners definition. Allowed owner syntax: `@username`, `@org/team-name` or `user@example.com` <br /> _source: https://help.github.com/articles/about-code-owners/#codeowners-syntax_. <br /> <br /> **Checks:** <br /> 	 1. Check if the owner's definition is valid (is either a GitHub user name, an organization team name or an email address). <br /><br /> 2. Check if a GitHub owner has a GitHub account <br /><br /> 3. Check if a GitHub owner is in a given organization <br /> <br />4. Check if an organization team exists |
| notowned |**[Not Owned File Checker]** <br /><br /> Reports if a given repository contain files that do not have specified owners in CODEOWNERS file. |
115
+
116
+
To enable experimental check set `EXPERIMENTAL_CHECKS=notowned` environment variable.
117
+
118
+
Check the [Configuration](#configuration) section for more info on how to enable and configure given checks.
119
+
88
120
#### Exit status codes
89
121
90
122
Application exits with different status codes which allow you to easily distinguish between error categories.
0 commit comments