Add discord notifier channel and test (#34150)

* Add discord notifier channel and test

* Correct payload

* remove print statement

* PR feedback and update due to changes in main

* Add discord notifier channel and test

* Correct payload

* remove print statement

* PR feedback and update due to changes in main

* update constructor and tests

* group imports sensibly

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
David Parrott
2021-05-19 17:31:55 +02:00
committed by GitHub
co-authored by Ganesh Vernekar
parent 2be27c391b
commit b9f4ec2030
5 changed files with 347 additions and 0 deletions
@@ -1223,6 +1223,47 @@ var expAvailableChannelJsonOutput = `
"secure": false
}
]
},
{
"type": "discord",
"name": "Discord",
"heading": "Discord settings",
"description": "Sends notifications to Discord",
"info": "",
"options": [
{
"label": "Message Content",
"description": "Mention a group using @ or a user using <@ID> when notifying in a channel",
"element": "input",
"inputType": "text",
"placeholder": "{{ template \"default.message\" . }}",
"propertyName": "message",
"selectOptions": null,
"showWhen": {
"field": "",
"is": ""
},
"required": false,
"validationRule": "",
"secure": false
},
{
"label": "Webhook URL",
"description": "",
"element": "input",
"inputType": "text",
"placeholder": "Discord webhook URL",
"propertyName": "url",
"selectOptions": null,
"showWhen": {
"field": "",
"is": ""
},
"required": true,
"validationRule": "",
"secure": false
}
]
}
]
`