@@ -16,6 +16,7 @@ type Config struct {
1616 Diagnostics DiagnosticsConfig `yaml:"diagnostics"`
1717 Server ServerConfig `yaml:"server"`
1818 Projects []Project `yaml:"projects"`
19+ ConfigPath string `yaml:"-" json:"-"`
1920}
2021
2122type IntegrationsConfig struct {
@@ -49,6 +50,7 @@ type SlackConfig struct {
4950 SigningKey string `envconfig:"SLACK_SIGNING_SECRET" default:"" yaml:"signing_key"`
5051 VerifyToken string `envconfig:"SLACK_VERIFICATION_TOKEN" default:"" yaml:"verify_token"`
5152 Channel string `envconfig:"SLACK_CHANNEL" default:"sre-tasks" yaml:"channel"`
53+ TeamID string `envconfig:"SLACK_TEAM_ID" default:"" yaml:"team_id"`
5254}
5355
5456type DiagnosticsConfig struct {
@@ -128,7 +130,7 @@ func Load() (*Config, error) {
128130 if err := yaml .Unmarshal (data , & cfg ); err != nil {
129131 return nil , fmt .Errorf ("invalid ponos.yml format: %w" , err )
130132 }
131-
133+ cfg . ConfigPath = configPath
132134 cfg .Sanitize ()
133135 return & cfg , nil
134136}
@@ -145,6 +147,7 @@ func (c *Config) Sanitize() {
145147 c .Integrations .Slack .SigningKey = strings .TrimSpace (c .Integrations .Slack .SigningKey )
146148 c .Integrations .Slack .Channel = strings .TrimSpace (c .Integrations .Slack .Channel )
147149 c .Integrations .Slack .VerifyToken = strings .TrimSpace (c .Integrations .Slack .VerifyToken )
150+ c .Integrations .Slack .TeamID = strings .TrimSpace (c .Integrations .Slack .TeamID )
148151
149152 c .APIEndpoint = strings .TrimSpace (c .APIEndpoint )
150153 c .APIKey = strings .TrimSpace (c .APIKey )
0 commit comments