@@ -258,6 +258,9 @@ func resolveFilepaths(baseDir string, cfg *Config) {
258258 for _ , cfg := range receiver .MSTeamsConfigs {
259259 cfg .HTTPConfig .SetDirectory (baseDir )
260260 }
261+ for _ , cfg := range receiver .JiraConfigs {
262+ cfg .HTTPConfig .SetDirectory (baseDir )
263+ }
261264 }
262265}
263266
@@ -540,6 +543,17 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
540543 return fmt .Errorf ("no msteams webhook URL or URLFile provided" )
541544 }
542545 }
546+ for _ , jira := range rcv .JiraConfigs {
547+ if jira .HTTPConfig == nil {
548+ jira .HTTPConfig = c .Global .HTTPConfig
549+ }
550+ if jira .APIURL == nil {
551+ if c .Global .JiraAPIURL == nil {
552+ return fmt .Errorf ("no global Jira Cloud URL set" )
553+ }
554+ jira .APIURL = c .Global .JiraAPIURL
555+ }
556+ }
543557
544558 names [rcv .Name ] = struct {}{}
545559 }
@@ -742,29 +756,31 @@ type GlobalConfig struct {
742756
743757 HTTPConfig * commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
744758
745- SMTPFrom string `yaml:"smtp_from,omitempty" json:"smtp_from,omitempty"`
746- SMTPHello string `yaml:"smtp_hello,omitempty" json:"smtp_hello,omitempty"`
747- SMTPSmarthost HostPort `yaml:"smtp_smarthost,omitempty" json:"smtp_smarthost,omitempty"`
748- SMTPAuthUsername string `yaml:"smtp_auth_username,omitempty" json:"smtp_auth_username,omitempty"`
749- SMTPAuthPassword Secret `yaml:"smtp_auth_password,omitempty" json:"smtp_auth_password,omitempty"`
750- SMTPAuthPasswordFile string `yaml:"smtp_auth_password_file,omitempty" json:"smtp_auth_password_file,omitempty"`
751- SMTPAuthSecret Secret `yaml:"smtp_auth_secret,omitempty" json:"smtp_auth_secret,omitempty"`
752- SMTPAuthIdentity string `yaml:"smtp_auth_identity,omitempty" json:"smtp_auth_identity,omitempty"`
753- SMTPRequireTLS bool `yaml:"smtp_require_tls" json:"smtp_require_tls,omitempty"`
754- SlackAPIURL * SecretURL `yaml:"slack_api_url,omitempty" json:"slack_api_url,omitempty"`
755- SlackAPIURLFile string `yaml:"slack_api_url_file,omitempty" json:"slack_api_url_file,omitempty"`
756- PagerdutyURL * URL `yaml:"pagerduty_url,omitempty" json:"pagerduty_url,omitempty"`
757- OpsGenieAPIURL * URL `yaml:"opsgenie_api_url,omitempty" json:"opsgenie_api_url,omitempty"`
758- OpsGenieAPIKey Secret `yaml:"opsgenie_api_key,omitempty" json:"opsgenie_api_key,omitempty"`
759- OpsGenieAPIKeyFile string `yaml:"opsgenie_api_key_file,omitempty" json:"opsgenie_api_key_file,omitempty"`
760- WeChatAPIURL * URL `yaml:"wechat_api_url,omitempty" json:"wechat_api_url,omitempty"`
761- WeChatAPISecret Secret `yaml:"wechat_api_secret,omitempty" json:"wechat_api_secret,omitempty"`
762- WeChatAPICorpID string `yaml:"wechat_api_corp_id,omitempty" json:"wechat_api_corp_id,omitempty"`
763- VictorOpsAPIURL * URL `yaml:"victorops_api_url,omitempty" json:"victorops_api_url,omitempty"`
764- VictorOpsAPIKey Secret `yaml:"victorops_api_key,omitempty" json:"victorops_api_key,omitempty"`
765- VictorOpsAPIKeyFile string `yaml:"victorops_api_key_file,omitempty" json:"victorops_api_key_file,omitempty"`
766- TelegramAPIUrl * URL `yaml:"telegram_api_url,omitempty" json:"telegram_api_url,omitempty"`
767- WebexAPIURL * URL `yaml:"webex_api_url,omitempty" json:"webex_api_url,omitempty"`
759+ SMTPFrom string `yaml:"smtp_from,omitempty" json:"smtp_from,omitempty"`
760+ SMTPHello string `yaml:"smtp_hello,omitempty" json:"smtp_hello,omitempty"`
761+ SMTPSmarthost HostPort `yaml:"smtp_smarthost,omitempty" json:"smtp_smarthost,omitempty"`
762+ SMTPAuthUsername string `yaml:"smtp_auth_username,omitempty" json:"smtp_auth_username,omitempty"`
763+ SMTPAuthPassword Secret `yaml:"smtp_auth_password,omitempty" json:"smtp_auth_password,omitempty"`
764+ SMTPAuthPasswordFile string `yaml:"smtp_auth_password_file,omitempty" json:"smtp_auth_password_file,omitempty"`
765+ SMTPAuthSecret Secret `yaml:"smtp_auth_secret,omitempty" json:"smtp_auth_secret,omitempty"`
766+ SMTPAuthIdentity string `yaml:"smtp_auth_identity,omitempty" json:"smtp_auth_identity,omitempty"`
767+ SMTPRequireTLS bool `yaml:"smtp_require_tls" json:"smtp_require_tls,omitempty"`
768+ SlackAPIURL * SecretURL `yaml:"slack_api_url,omitempty" json:"slack_api_url,omitempty"`
769+ SlackAPIURLFile string `yaml:"slack_api_url_file,omitempty" json:"slack_api_url_file,omitempty"`
770+ PagerdutyURL * URL `yaml:"pagerduty_url,omitempty" json:"pagerduty_url,omitempty"`
771+ OpsGenieAPIURL * URL `yaml:"opsgenie_api_url,omitempty" json:"opsgenie_api_url,omitempty"`
772+ OpsGenieAPIKey Secret `yaml:"opsgenie_api_key,omitempty" json:"opsgenie_api_key,omitempty"`
773+ OpsGenieAPIKeyFile string `yaml:"opsgenie_api_key_file,omitempty" json:"opsgenie_api_key_file,omitempty"`
774+ WeChatAPIURL * URL `yaml:"wechat_api_url,omitempty" json:"wechat_api_url,omitempty"`
775+ WeChatAPISecret Secret `yaml:"wechat_api_secret,omitempty" json:"wechat_api_secret,omitempty"`
776+ WeChatAPICorpID string `yaml:"wechat_api_corp_id,omitempty" json:"wechat_api_corp_id,omitempty"`
777+ VictorOpsAPIURL * URL `yaml:"victorops_api_url,omitempty" json:"victorops_api_url,omitempty"`
778+ VictorOpsAPIKey Secret `yaml:"victorops_api_key,omitempty" json:"victorops_api_key,omitempty"`
779+ VictorOpsAPIKeyFile string `yaml:"victorops_api_key_file,omitempty" json:"victorops_api_key_file,omitempty"`
780+ TelegramAPIUrl * URL `yaml:"telegram_api_url,omitempty" json:"telegram_api_url,omitempty"`
781+ WebexAPIURL * URL `yaml:"webex_api_url,omitempty" json:"webex_api_url,omitempty"`
782+ SMTPTLSConfig * commoncfg.TLSConfig `yaml:"smtp_tls_config,omitempty" json:"smtp_tls_config,omitempty"`
783+ JiraAPIURL * URL `yaml:"jira_api_url,omitempty" json:"jira_api_url,omitempty"`
768784}
769785
770786// UnmarshalYAML implements the yaml.Unmarshaler interface for GlobalConfig.
@@ -909,6 +925,7 @@ type Receiver struct {
909925 TelegramConfigs []* TelegramConfig `yaml:"telegram_configs,omitempty" json:"telegram_configs,omitempty"`
910926 WebexConfigs []* WebexConfig `yaml:"webex_configs,omitempty" json:"webex_configs,omitempty"`
911927 MSTeamsConfigs []* MSTeamsConfig `yaml:"msteams_configs,omitempty" json:"msteams_configs,omitempty"`
928+ JiraConfigs []* JiraConfig `yaml:"jira_configs,omitempty" json:"jira_configs,omitempty"`
912929}
913930
914931// UnmarshalYAML implements the yaml.Unmarshaler interface for Receiver.
0 commit comments