1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-20 19:32:17 -07:00

Allow PagerDuty to restrict on scheduleID

This commit is contained in:
Chris Cummer
2019-05-12 09:42:20 -07:00
parent f6ed8b6b45
commit 5f054c8ffd
3 changed files with 17 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ type Settings struct {
apiKey string
escalationFilter []interface{}
scheduleIDs []interface{}
showIncidents bool
showSchedules bool
}
@@ -25,6 +26,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co
apiKey: ymlConfig.UString("apiKey", os.Getenv("WTF_PAGERDUTY_API_KEY")),
escalationFilter: ymlConfig.UList("escalationFilter"),
scheduleIDs: ymlConfig.UList("scheduleIDs", []interface{}{}),
showIncidents: ymlConfig.UBool("showIncidents", true),
showSchedules: ymlConfig.UBool("showSchedules", true),
}