From 2ac83ffac742311f76bebf6291392b923696f0aa Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 19 Nov 2020 16:13:53 -0400 Subject: [PATCH] MM-30800: prepackage incident management 1.1 (#16323) * prepackage incident management v1.1 (#16195) Fixes: https://mattermost.atlassian.net/browse/MM-30800 Co-authored-by: Mattermod * update telemetry whitelist * newer version! Co-authored-by: Mattermod --- Makefile | 2 +- model/config.go | 6 +++--- model/config_test.go | 12 ++++++------ services/telemetry/telemetry.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index af0af2c2af..04e00c3e36 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ PLUGIN_PACKAGES += mattermost-plugin-antivirus-v0.1.2 PLUGIN_PACKAGES += mattermost-plugin-jira-v2.3.2 PLUGIN_PACKAGES += mattermost-plugin-gitlab-v1.1.0 PLUGIN_PACKAGES += mattermost-plugin-jenkins-v1.0.0 -PLUGIN_PACKAGES += mattermost-plugin-incident-response-v0.6.0 +PLUGIN_PACKAGES += mattermost-plugin-incident-management-v1.1.1 # Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target ifeq ($(BUILD_ENTERPRISE_READY),true) diff --git a/model/config.go b/model/config.go index 28b381a3c3..f43dd14577 100644 --- a/model/config.go +++ b/model/config.go @@ -2669,9 +2669,9 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) { s.PluginStates["com.mattermost.nps"] = &PluginState{Enable: ls.EnableDiagnostics == nil || *ls.EnableDiagnostics} } - if s.PluginStates["com.mattermost.plugin-incident-response"] == nil { - // Enable the incident response plugin by default - s.PluginStates["com.mattermost.plugin-incident-response"] = &PluginState{Enable: true} + if s.PluginStates["com.mattermost.plugin-incident-management"] == nil { + // Enable the incident management plugin by default + s.PluginStates["com.mattermost.plugin-incident-management"] = &PluginState{Enable: true} } if s.EnableMarketplace == nil { diff --git a/model/config_test.go b/model/config_test.go index 48a8d8013b..eda4993007 100644 --- a/model/config_test.go +++ b/model/config_test.go @@ -308,19 +308,19 @@ func TestConfigDefaultNPSPluginState(t *testing.T) { }) } -func TestConfigDefaultIncidentResponsePluginState(t *testing.T) { - t.Run("should enable IncidentResponse plugin by default", func(t *testing.T) { +func TestConfigDefaultIncidentManagementPluginState(t *testing.T) { + t.Run("should enable IncidentManagement plugin by default", func(t *testing.T) { c1 := Config{} c1.SetDefaults() - assert.True(t, c1.PluginSettings.PluginStates["com.mattermost.plugin-incident-response"].Enable) + assert.True(t, c1.PluginSettings.PluginStates["com.mattermost.plugin-incident-management"].Enable) }) - t.Run("should not re-enable IncidentResponse plugin after it has been disabled", func(t *testing.T) { + t.Run("should not re-enable IncidentManagement plugin after it has been disabled", func(t *testing.T) { c1 := Config{ PluginSettings: PluginSettings{ PluginStates: map[string]*PluginState{ - "com.mattermost.plugin-incident-response": { + "com.mattermost.plugin-incident-management": { Enable: false, }, }, @@ -329,7 +329,7 @@ func TestConfigDefaultIncidentResponsePluginState(t *testing.T) { c1.SetDefaults() - assert.False(t, c1.PluginSettings.PluginStates["com.mattermost.plugin-incident-response"].Enable) + assert.False(t, c1.PluginSettings.PluginStates["com.mattermost.plugin-incident-management"].Enable) }) } diff --git a/services/telemetry/telemetry.go b/services/telemetry/telemetry.go index 6f596cedf6..a197f54e02 100644 --- a/services/telemetry/telemetry.go +++ b/services/telemetry/telemetry.go @@ -1282,7 +1282,7 @@ func (ts *TelemetryService) trackPluginConfig(cfg *model.Config, marketplaceURL "com.mattermost.custom-attributes", "com.mattermost.mscalendar", "com.mattermost.nps", - "com.mattermost.plugin-incident-response", + "com.mattermost.plugin-incident-management", "com.mattermost.plugin-todo", "com.mattermost.webex", "com.mattermost.welcomebot",