File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,13 +106,25 @@ func main() {
106106 switch strings .ToLower (getEnv (EnvSlackColor )) {
107107 case "success" :
108108 color = "good"
109- text = envOr (EnvSlackOnSuccess , text ) // If exists, override with on success
109+ // If exists, override with on success
110+ success_msg := envOr (EnvSlackOnSuccess , "" )
111+ if success_msg != "" {
112+ text = success_msg
113+ }
110114 case "cancelled" :
111115 color = "#808080"
112- text = envOr (EnvSlackOnCancel , text ) // If exists, override with on cancelled
116+ // If exists, override with on cancel
117+ cancel_msg := envOr (EnvSlackOnCancel , "" )
118+ if cancel_msg != "" {
119+ text = cancel_msg
120+ }
113121 case "failure" :
114122 color = "danger"
115- text = envOr (EnvSlackOnFailure , text ) // If exists, override with on failure
123+ // If exists, override with on failure
124+ failure_msg := envOr (EnvSlackOnFailure , "" )
125+ if failure_msg != "" {
126+ text = failure_msg
127+ }
116128 default :
117129 color = envOr (EnvSlackColor , "good" )
118130 }
You can’t perform that action at this time.
0 commit comments