Fix repository/project type from config

Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
This commit is contained in:
justusbunsi 2021-06-21 10:31:11 +02:00
commit 71b19c35b8
No known key found for this signature in database
GPG key ID: 990B348ECAC9C7DB
2 changed files with 11 additions and 9 deletions

View file

@ -20,11 +20,12 @@ gitea:
# will be ignored.
# A repository specification contains the owner name and the repository name itself. The owner can be the name of a
# real account or an organization in which the repository is located.
repositories:
- owner: justusbunsi
name: example-repo
- owner: my-organization
name: example-repo
# If empty array given, don't filter requests for repositories and proceed them all.
repositories: []
# - owner: justusbunsi
# name: example-repo
# - owner: my-organization
# name: example-repo
# SonarQube related configuration. Necessary for requesting data from the API and processing the webhook.
@ -47,6 +48,7 @@ sonarqube:
# file: /path/to/sonarqube/webhook/secret
# List of project keys from inside SonarQube that should be handled. Webhooks containing other projects will be ignored.
projects:
- project-1
- project-2
# If empty array given, don't filter requests for repositories and proceed them all.
projects: []
# - project-1
# - project-2

View file

@ -53,7 +53,7 @@ func ApplyConfigDefaults() {
viper.SetDefault("gitea.token", "")
viper.SetDefault("gitea.webhookSecret.value", "")
viper.SetDefault("gitea.webhookSecret.file", "")
viper.SetDefault("gitea.repositories", []interface{}{})
viper.SetDefault("gitea.repositories", []GiteaRepository{})
viper.SetDefault("sonarqube.url", "")
viper.SetDefault("sonarqube.token", "")
viper.SetDefault("sonarqube.webhookSecret.value", "")