-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize and validate channel names and IDs (#1142)
- Loading branch information
Showing
12 changed files
with
297 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
pkg/config/testdata/TestLoadedConfigValidationErrors/invalid-channels.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
communications: # req 1 elm. | ||
'default-workspace': | ||
cloudSlack: | ||
enabled: true | ||
channels: | ||
'alias': | ||
name: '#correct' | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
'alias2': | ||
name: 'INCORRECT' | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
|
||
token: 'TOKEN' | ||
|
||
socketSlack: | ||
enabled: true | ||
channels: | ||
'alias': | ||
name: '#correct' | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
'alias2': | ||
name: 'INCORRECT' | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
|
||
appToken: 'xapp-SLACK_APP_TOKEN' | ||
botToken: 'xoxb-SLACK_BOT_TOKEN' | ||
|
||
discord: | ||
enabled: true | ||
token: 'DISCORD_TOKEN' | ||
botID: 'DISCORD_BOT_ID' | ||
channels: | ||
'alias': | ||
id: '976789916447019068' # correct | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
'alias2': | ||
id: 'incorrect' | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
|
||
mattermost: | ||
enabled: true | ||
url: 'MATTERMOST_SERVER_URL' | ||
token: 'MATTERMOST_TOKEN' | ||
team: 'MATTERMOST_TEAM' | ||
channels: | ||
'alias': | ||
name: "too-long name really really really really really really really really really really really really long" | ||
notification: | ||
disabled: true | ||
bindings: | ||
executors: | ||
- kubectl-read-only | ||
sources: | ||
- k8s-events | ||
notification: | ||
type: short | ||
|
||
executors: | ||
kubectl-read-only: {} | ||
sources: | ||
k8s-events: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.