Skip to content

Commit

Permalink
⚠️ Change VALID_OWNER_CHECKER_ORGANIZATION_NAME to OWNER_CHECKER_ORGA…
Browse files Browse the repository at this point in the history
…NIZATION_NAME
  • Loading branch information
mszostok committed Mar 24, 2019
1 parent 3d45ad2 commit b2b0d86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The Codeowners Validator project validates the GitHub [CODEOWNERS](https://help.
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](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. |
|-----|:---------:|:--------|:------------|
| **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](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. |
| **GITHUB_BASE_URL** | No | https://api.github.com/ | 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. |
| **GITHUB_UPLOAD_URL** | No | https://uploads.github.com/ | The GitHub upload URL for uploading files. <br> <br>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. |
| **CHECK_FAILURE_LEVEL** | No | `warning` | Defines the level on which application should treat check issue as a failure. Defaults to `warning`, which treats both `error` and `warning` as failure and exits with error code 2. Possible values are: `error` and `warning`. |
| **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. |
| **OWNER_CHECKER_ORGANIZATION_NAME** | Yes | | The organization name where the repository is created. Used to check if GitHub owner is in the given organization. |


![usage](./docs/assets/usage.png)
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Config struct {
UploadURL string `envconfig:"optional"`
}
CheckFailureLevel check.SeverityType `envconfig:"default=warning"`
ValidOwnerChecker check.ValidOwnerCheckerConfig
OwnerChecker check.ValidOwnerCheckerConfig
}

func main() {
Expand Down Expand Up @@ -60,7 +60,7 @@ func main() {
// aggregates checks
checks := []check.Checker{
check.NewFileExist(),
check.NewValidOwner(cfg.ValidOwnerChecker, ghClient),
check.NewValidOwner(cfg.OwnerChecker, ghClient),
}

// run check runner
Expand Down

0 comments on commit b2b0d86

Please sign in to comment.