feat(alerting): ClickUp alerting provider (#1462)
* feat(alerting): Add ClickUp alerting provider * test: added ClickUp tests, docs in README and switch http to github.com/TwiN/gatus/v5/client from http.Client * docs: Update ClickUp API token instructions in README * fix(alerting): Update ClickUp alert configuration and default values * docs: fixed formatting and removed line breaks from content in README * feat(alerting): Add group-specific overrides and validation checks, updated README * Update alerting/provider/clickup/clickup.go Co-authored-by: PythonGermany <97847597+PythonGermany@users.noreply.github.com> * fix(alerting): add priority validation * fix(alerting): set default priority to 3 * feat(alerting): add priority map for ClickUp provider * feat(alerting): make notify-all configurable for ClickUp provider * docs: add instructions for finding Assignee IDs for ClickUp * refactor(alerting): simplified ClickUp configurations example * refactor(alerting): clean up new lines in ClickUp provider --------- Co-authored-by: PythonGermany <97847597+PythonGermany@users.noreply.github.com>
This commit is contained in:
@@ -594,6 +594,7 @@ func ValidateAlertingConfig(alertingConfig *alerting.Config, endpoints []*endpoi
|
||||
}
|
||||
alertTypes := []alert.Type{
|
||||
alert.TypeAWSSES,
|
||||
alert.TypeClickUp,
|
||||
alert.TypeCustom,
|
||||
alert.TypeDatadog,
|
||||
alert.TypeDiscord,
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/TwiN/gatus/v5/alerting/alert"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider/awsses"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider/clickup"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider/custom"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider/datadog"
|
||||
"github.com/TwiN/gatus/v5/alerting/provider/discord"
|
||||
@@ -1854,6 +1855,7 @@ func TestParseAndValidateConfigBytesWithNoEndpoints(t *testing.T) {
|
||||
func TestGetAlertingProviderByAlertType(t *testing.T) {
|
||||
alertingConfig := &alerting.Config{
|
||||
AWSSimpleEmailService: &awsses.AlertProvider{},
|
||||
ClickUp: &clickup.AlertProvider{},
|
||||
Custom: &custom.AlertProvider{},
|
||||
Datadog: &datadog.AlertProvider{},
|
||||
Discord: &discord.AlertProvider{},
|
||||
@@ -1898,6 +1900,7 @@ func TestGetAlertingProviderByAlertType(t *testing.T) {
|
||||
expected provider.AlertProvider
|
||||
}{
|
||||
{alertType: alert.TypeAWSSES, expected: alertingConfig.AWSSimpleEmailService},
|
||||
{alertType: alert.TypeClickUp, expected: alertingConfig.ClickUp},
|
||||
{alertType: alert.TypeCustom, expected: alertingConfig.Custom},
|
||||
{alertType: alert.TypeDatadog, expected: alertingConfig.Datadog},
|
||||
{alertType: alert.TypeDiscord, expected: alertingConfig.Discord},
|
||||
|
||||
Reference in New Issue
Block a user