diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e0fe942319..418b6a62af 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ env: jobs: lint: - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-22.04 steps: - name: ci/checkout-repo uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 @@ -208,7 +208,7 @@ jobs: search_path: tests/integration e2e-cypress-tests: - runs-on: ubuntu-latest-8-cores + runs-on: ubuntu-22.04 name: e2e-cypress-tests-run-${{ matrix.runId }} needs: - lint diff --git a/assets/i18n/nb_NO.json b/assets/i18n/nb_NO.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/assets/i18n/nb_NO.json @@ -0,0 +1 @@ +[] diff --git a/build/go.mod b/build/go.mod index 82b60fb86d..42b70927d6 100644 --- a/build/go.mod +++ b/build/go.mod @@ -5,7 +5,7 @@ go 1.22 toolchain go1.22.8 require ( - github.com/mattermost/mattermost/server/public v0.1.7 + github.com/mattermost/mattermost/server/public v0.1.8 github.com/pkg/errors v0.9.1 ) diff --git a/build/go.sum b/build/go.sum index 1b1683558b..48330b788f 100644 --- a/build/go.sum +++ b/build/go.sum @@ -96,8 +96,8 @@ github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956 h1:Y1Tu/swM31pVwwb github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956/go.mod h1:SRl30Lb7/QoYyohYeVBuqYvvmXSZJxZgiV3Zf6VbxjI= github.com/mattermost/logr/v2 v2.0.21 h1:CMHsP+nrbRlEC4g7BwOk1GAnMtHkniFhlSQPXy52be4= github.com/mattermost/logr/v2 v2.0.21/go.mod h1:kZkB/zqKL9e+RY5gB3vGpsyenC+TpuiOenjMkvJJbzc= -github.com/mattermost/mattermost/server/public v0.1.7 h1:WA+fnLrQQeE6xTyHERqcGiKljBFK6m8WYL4Pez07ko4= -github.com/mattermost/mattermost/server/public v0.1.7/go.mod h1:SkTKbMul91Rq0v2dIxe8mqzUOY+3KwlwwLmAlxDfGCk= +github.com/mattermost/mattermost/server/public v0.1.8 h1:Z2PUXR4YGquuSo3ojNUl0aazOMSRqALjyMaf20jNIy4= +github.com/mattermost/mattermost/server/public v0.1.8/go.mod h1:SkTKbMul91Rq0v2dIxe8mqzUOY+3KwlwwLmAlxDfGCk= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= diff --git a/build/manifest/main.go b/build/manifest/main.go index 890414a447..9adec45805 100644 --- a/build/manifest/main.go +++ b/build/manifest/main.go @@ -6,8 +6,9 @@ import ( "os" "strings" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" ) const pluginIDGoFileTemplate = `// This file is automatically generated. Do not modify it manually. diff --git a/client/client.go b/client/client.go index 5eae7c060d..f94f2529d0 100644 --- a/client/client.go +++ b/client/client.go @@ -16,9 +16,10 @@ import ( "strconv" "github.com/google/go-querystring/query" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "golang.org/x/oauth2" + + "github.com/mattermost/mattermost/server/public/model" ) const ( diff --git a/client/doc_test.go b/client/doc_test.go index 5911c5e540..1fa4703fbe 100644 --- a/client/doc_test.go +++ b/client/doc_test.go @@ -5,8 +5,9 @@ import ( "fmt" "log" - "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" ) func Example() { diff --git a/client/playbook_runs_test.go b/client/playbook_runs_test.go index e9490e4371..c97828e479 100644 --- a/client/playbook_runs_test.go +++ b/client/playbook_runs_test.go @@ -5,8 +5,9 @@ import ( "fmt" "log" - "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" ) func ExamplePlaybookRunService_Get() { diff --git a/client/playbooks_test.go b/client/playbooks_test.go index 841df2cf43..265e955690 100644 --- a/client/playbooks_test.go +++ b/client/playbooks_test.go @@ -5,8 +5,9 @@ import ( "fmt" "log" - "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" ) func ExamplePlaybooksService_Get() { diff --git a/go.mod b/go.mod index 5951c71c05..ab2aa367e9 100644 --- a/go.mod +++ b/go.mod @@ -26,8 +26,8 @@ require ( github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/mattermost/mattermost-plugin-playbooks/client v0.7.0 - github.com/mattermost/mattermost/server/public v0.1.9 - github.com/mattermost/mattermost/server/v8 v8.0.0-20241113102039-053d0b5f0ad5 + github.com/mattermost/mattermost/server/public v0.1.8 + github.com/mattermost/mattermost/server/v8 v8.0.0-20241112090719-5eef415a39e1 github.com/mattermost/morph v1.1.0 github.com/mitchellh/mapstructure v1.5.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 50612c6be3..bd306f3ba5 100644 --- a/go.sum +++ b/go.sum @@ -295,10 +295,10 @@ github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956 h1:Y1Tu/swM31pVwwb github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956/go.mod h1:SRl30Lb7/QoYyohYeVBuqYvvmXSZJxZgiV3Zf6VbxjI= github.com/mattermost/logr/v2 v2.0.21 h1:CMHsP+nrbRlEC4g7BwOk1GAnMtHkniFhlSQPXy52be4= github.com/mattermost/logr/v2 v2.0.21/go.mod h1:kZkB/zqKL9e+RY5gB3vGpsyenC+TpuiOenjMkvJJbzc= -github.com/mattermost/mattermost/server/public v0.1.9 h1:l/OKPRVuFeqL0yqRVC/JpveG5sLNKcT9llxqMkO9e+s= -github.com/mattermost/mattermost/server/public v0.1.9/go.mod h1:SkTKbMul91Rq0v2dIxe8mqzUOY+3KwlwwLmAlxDfGCk= -github.com/mattermost/mattermost/server/v8 v8.0.0-20241113102039-053d0b5f0ad5 h1:XVePV2EZhapQ6JIGFycfTd1QgxICvDs8rRUy3pqxagQ= -github.com/mattermost/mattermost/server/v8 v8.0.0-20241113102039-053d0b5f0ad5/go.mod h1:B4pQsrbZs6yO4GpWY6nCJPNG7myB0r3gvlFWWlGABmc= +github.com/mattermost/mattermost/server/public v0.1.8 h1:Z2PUXR4YGquuSo3ojNUl0aazOMSRqALjyMaf20jNIy4= +github.com/mattermost/mattermost/server/public v0.1.8/go.mod h1:SkTKbMul91Rq0v2dIxe8mqzUOY+3KwlwwLmAlxDfGCk= +github.com/mattermost/mattermost/server/v8 v8.0.0-20241112090719-5eef415a39e1 h1:qNW9//+lx3kwCETTCvqjrFgQ3SH0DyHusE3PnGJfHVE= +github.com/mattermost/mattermost/server/v8 v8.0.0-20241112090719-5eef415a39e1/go.mod h1:B4pQsrbZs6yO4GpWY6nCJPNG7myB0r3gvlFWWlGABmc= github.com/mattermost/morph v1.1.0 h1:Q9vrJbeM3s2jfweGheq12EFIzdNp9a/6IovcbvOQ6Cw= github.com/mattermost/morph v1.1.0/go.mod h1:gD+EaqX2UMyyuzmF4PFh4r33XneQ8Nzi+0E8nXjMa3A= github.com/mattermost/rsc v0.0.0-20160330161541-bbaefb05eaa0 h1:G9tL6JXRBMzjuD1kkBtcnd42kUiT6QDwxfFYu7adM6o= diff --git a/server/api/actions.go b/server/api/actions.go index b1e3ba62b7..4a01925735 100644 --- a/server/api/actions.go +++ b/server/api/actions.go @@ -6,13 +6,14 @@ import ( "net/http" "net/url" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost-plugin-playbooks/server/safemapstructure" - "github.com/mattermost/mattermost/server/public/model" + "github.com/gorilla/mux" "github.com/pkg/errors" - "github.com/gorilla/mux" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + "github.com/mattermost/mattermost-plugin-playbooks/server/safemapstructure" ) type ActionsHandler struct { diff --git a/server/api/categories.go b/server/api/categories.go index f8035981f9..b2d7248fc9 100644 --- a/server/api/categories.go +++ b/server/api/categories.go @@ -6,11 +6,12 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) const maxItemsInRunsAndPlaybooksCategory = 1000 diff --git a/server/api/graphql_root_playbook.go b/server/api/graphql_root_playbook.go index 96ddd4a16d..6c56e7d9a9 100644 --- a/server/api/graphql_root_playbook.go +++ b/server/api/graphql_root_playbook.go @@ -4,10 +4,12 @@ import ( "context" "encoding/json" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "gopkg.in/guregu/null.v4" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) // RunMutationCollection hold all mutation functions for a playbookRun diff --git a/server/api/graphql_root_run.go b/server/api/graphql_root_run.go index ada4a1180a..940c2dab6a 100644 --- a/server/api/graphql_root_run.go +++ b/server/api/graphql_root_run.go @@ -3,10 +3,12 @@ package api import ( "context" + "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" - "github.com/pkg/errors" ) // RunRootResolver hold all queries and mutations for a playbookRun diff --git a/server/api/logger.go b/server/api/logger.go index 6276cbd6f1..8d8c2fbc6a 100644 --- a/server/api/logger.go +++ b/server/api/logger.go @@ -5,8 +5,9 @@ import ( "net/http" "time" - "github.com/mattermost/mattermost/server/public/model" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" ) // statusRecorder intercepts and saves the status code written to an http.ResponseWriter. diff --git a/server/api/playbook_runs.go b/server/api/playbook_runs.go index 8a3b0b2c59..4e93fb8819 100644 --- a/server/api/playbook_runs.go +++ b/server/api/playbook_runs.go @@ -12,12 +12,12 @@ import ( "time" "github.com/gorilla/mux" - "github.com/mattermost/mattermost-plugin-playbooks/client" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" + "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost-plugin-playbooks/server/app" "github.com/mattermost/mattermost-plugin-playbooks/server/bot" "github.com/mattermost/mattermost-plugin-playbooks/server/config" diff --git a/server/api/playbooks.go b/server/api/playbooks.go index 47574e85a2..3a8bd07d11 100644 --- a/server/api/playbooks.go +++ b/server/api/playbooks.go @@ -10,13 +10,14 @@ import ( "time" "github.com/gorilla/mux" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost-plugin-playbooks/server/config" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + "github.com/mattermost/mattermost-plugin-playbooks/server/config" ) // PlaybookHandler is the API handler. diff --git a/server/api/signal.go b/server/api/signal.go index 70e31ff35f..634bb0c6c1 100644 --- a/server/api/signal.go +++ b/server/api/signal.go @@ -6,11 +6,12 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/pluginapi" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/pluginapi" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) diff --git a/server/api/stats.go b/server/api/stats.go index dfb7e15e34..42e86674c3 100644 --- a/server/api/stats.go +++ b/server/api/stats.go @@ -5,15 +5,15 @@ import ( "net/http" "net/url" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" - "gopkg.in/guregu/null.v4" - "github.com/gorilla/mux" - "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore" "github.com/pkg/errors" + "gopkg.in/guregu/null.v4" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore" ) type StatsHandler struct { diff --git a/server/api/urls.go b/server/api/urls.go index 9fcc0a8a78..145dd02c2a 100644 --- a/server/api/urls.go +++ b/server/api/urls.go @@ -5,10 +5,10 @@ import ( "net/url" "path" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" ) diff --git a/server/api_actions_test.go b/server/api_actions_test.go index 2b6e8b13d1..6ec0649561 100644 --- a/server/api_actions_test.go +++ b/server/api_actions_test.go @@ -5,10 +5,12 @@ import ( "net/http" "testing" + "github.com/stretchr/testify/assert" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost-plugin-playbooks/client" "github.com/mattermost/mattermost-plugin-playbooks/server/safemapstructure" - "github.com/mattermost/mattermost/server/public/model" - "github.com/stretchr/testify/assert" ) func TestActionCreation(t *testing.T) { diff --git a/server/api_bot_test.go b/server/api_bot_test.go index 53aab1354d..e77f7f7dc9 100644 --- a/server/api_bot_test.go +++ b/server/api_bot_test.go @@ -6,8 +6,9 @@ import ( "net/http" "testing" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/assert" + + "github.com/mattermost/mattermost/server/public/model" ) func TestTrialLicences(t *testing.T) { diff --git a/server/api_playbooks_test.go b/server/api_playbooks_test.go index c94a3cd9f6..304b60a7aa 100644 --- a/server/api_playbooks_test.go +++ b/server/api_playbooks_test.go @@ -10,12 +10,14 @@ import ( "strings" "testing" - "github.com/mattermost/mattermost-plugin-playbooks/client" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) func TestPlaybooks(t *testing.T) { diff --git a/server/api_runs_test.go b/server/api_runs_test.go index 84962ab525..bfaca6a04c 100644 --- a/server/api_runs_test.go +++ b/server/api_runs_test.go @@ -8,11 +8,13 @@ import ( "testing" "time" - "github.com/mattermost/mattermost-plugin-playbooks/client" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) func TestRunCreation(t *testing.T) { diff --git a/server/api_tabapp_test.go b/server/api_tabapp_test.go index 773b727f6e..d60fc0b4ae 100644 --- a/server/api_tabapp_test.go +++ b/server/api_tabapp_test.go @@ -5,11 +5,13 @@ import ( "net/http" "testing" - "github.com/mattermost/mattermost-plugin-playbooks/client" - "github.com/mattermost/mattermost-plugin-playbooks/server/api" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/client" + "github.com/mattermost/mattermost-plugin-playbooks/server/api" ) func TestTabAppGetRuns(t *testing.T) { @@ -36,7 +38,6 @@ func TestTabAppGetRuns(t *testing.T) { } _, _, err := e.ServerAdminClient.PatchConfig(context.Background(), &patchedConfig) require.NoError(t, err) - } setDeveloperMode := func(t *testing.T, enable bool) { diff --git a/server/app/actions_service.go b/server/app/actions_service.go index f995fa1a81..641d8f1674 100644 --- a/server/app/actions_service.go +++ b/server/app/actions_service.go @@ -6,13 +6,15 @@ import ( "sync" "time" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/pluginapi" + "github.com/mattermost/mattermost-plugin-playbooks/server/bot" "github.com/mattermost/mattermost-plugin-playbooks/server/config" "github.com/mattermost/mattermost-plugin-playbooks/server/safemapstructure" - "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/pluginapi" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" ) type PlaybookGetter interface { diff --git a/server/app/category_service.go b/server/app/category_service.go index 28088f626d..066c56c42a 100644 --- a/server/app/category_service.go +++ b/server/app/category_service.go @@ -3,9 +3,10 @@ package app import ( "database/sql" + "github.com/pkg/errors" + "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" - "github.com/pkg/errors" ) type categoryService struct { diff --git a/server/app/permissions_service.go b/server/app/permissions_service.go index d12aa055ab..f27f487cbf 100644 --- a/server/app/permissions_service.go +++ b/server/app/permissions_service.go @@ -4,11 +4,13 @@ import ( "reflect" "strings" - "github.com/mattermost/mattermost-plugin-playbooks/server/config" - "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/pluginapi" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/config" ) // ErrNoPermissions if the error is caused by the user not having permissions diff --git a/server/app/playbook.go b/server/app/playbook.go index 51bc7842a3..3e4b5d556e 100644 --- a/server/app/playbook.go +++ b/server/app/playbook.go @@ -7,9 +7,8 @@ import ( "net/url" "strings" - "gopkg.in/guregu/null.v4" - "github.com/pkg/errors" + "gopkg.in/guregu/null.v4" ) // Playbook represents a desired business outcome, from which playbook runs are started to solve diff --git a/server/app/playbook_run.go b/server/app/playbook_run.go index cc6cd84fe2..8ba58faa17 100644 --- a/server/app/playbook_run.go +++ b/server/app/playbook_run.go @@ -5,9 +5,8 @@ import ( "strings" "time" - "gopkg.in/guregu/null.v4" - "github.com/pkg/errors" + "gopkg.in/guregu/null.v4" "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi/cluster" diff --git a/server/app/playbook_run_test.go b/server/app/playbook_run_test.go index 671d70ddec..526673d3a1 100644 --- a/server/app/playbook_run_test.go +++ b/server/app/playbook_run_test.go @@ -4,8 +4,9 @@ import ( "encoding/json" "testing" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" ) func TestPlaybookRun_MarshalJSON(t *testing.T) { diff --git a/server/app/playbook_service.go b/server/app/playbook_service.go index ada11d4a43..2b2a917689 100644 --- a/server/app/playbook_service.go +++ b/server/app/playbook_service.go @@ -1,11 +1,12 @@ package app import ( - "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/pluginapi" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/pluginapi" + "github.com/mattermost/mattermost-plugin-playbooks/server/bot" "github.com/mattermost/mattermost-plugin-playbooks/server/metrics" ) diff --git a/server/app/plugin_api_tools.go b/server/app/plugin_api_tools.go index b7f5ace531..bdd2decf64 100644 --- a/server/app/plugin_api_tools.go +++ b/server/app/plugin_api_tools.go @@ -1,8 +1,9 @@ package app import ( - "github.com/mattermost/mattermost/server/public/pluginapi" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/pluginapi" ) var ( diff --git a/server/app/reminder.go b/server/app/reminder.go index 9c18e50f48..321bdf3605 100644 --- a/server/app/reminder.go +++ b/server/app/reminder.go @@ -8,9 +8,10 @@ import ( "strings" "time" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" ) const RetrospectivePrefix = "retro_" diff --git a/server/app/task_actions.go b/server/app/task_actions.go index ec112e4f8e..7d706663c1 100644 --- a/server/app/task_actions.go +++ b/server/app/task_actions.go @@ -4,9 +4,10 @@ import ( "encoding/json" "strings" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" ) type TaskAction struct { diff --git a/server/app/task_actions_test.go b/server/app/task_actions_test.go index 68ea377646..58644c35fb 100644 --- a/server/app/task_actions_test.go +++ b/server/app/task_actions_test.go @@ -3,8 +3,9 @@ package app import ( "testing" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" ) func TestTaskActionActions(t *testing.T) { diff --git a/server/bot/bot.go b/server/bot/bot.go index bc95a2db3c..49ae62d10a 100644 --- a/server/bot/bot.go +++ b/server/bot/bot.go @@ -1,10 +1,10 @@ package bot import ( - "github.com/mattermost/mattermost-plugin-playbooks/server/config" "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/config" ) // Bot stores the information for the plugin configuration, and implements the Poster interfaces. diff --git a/server/bot/poster.go b/server/bot/poster.go index 2b9d4e0a37..6e4cae64c0 100644 --- a/server/bot/poster.go +++ b/server/bot/poster.go @@ -4,9 +4,10 @@ import ( "encoding/json" "fmt" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" ) const maxAdminsToQueryForNotification = 1000 diff --git a/server/command/command.go b/server/command/command.go index c45bc0cf22..99bd15e7d7 100644 --- a/server/command/command.go +++ b/server/command/command.go @@ -7,16 +7,17 @@ import ( "strings" "time" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost-plugin-playbooks/server/bot" - "github.com/mattermost/mattermost-plugin-playbooks/server/config" - "github.com/mattermost/mattermost-plugin-playbooks/server/timeutils" - "github.com/mattermost/mattermost/server/public/model" - "github.com/mattermost/mattermost/server/public/plugin" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/plugin" "github.com/mattermost/mattermost/server/public/pluginapi" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + "github.com/mattermost/mattermost-plugin-playbooks/server/bot" + "github.com/mattermost/mattermost-plugin-playbooks/server/config" + "github.com/mattermost/mattermost-plugin-playbooks/server/timeutils" ) const helpText = "###### Mattermost Playbooks Plugin - Slash Command Help\n" + diff --git a/server/sqlstore/actions.go b/server/sqlstore/actions.go index 334b808f47..33560f1e74 100644 --- a/server/sqlstore/actions.go +++ b/server/sqlstore/actions.go @@ -8,9 +8,11 @@ import ( sq "github.com/Masterminds/squirrel" "github.com/go-sql-driver/mysql" "github.com/lib/pq" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) // playbookStore is a sql store for playbooks. Use NewPlaybookStore to create it. diff --git a/server/sqlstore/actions_test.go b/server/sqlstore/actions_test.go index 25e12339c3..23881603bc 100644 --- a/server/sqlstore/actions_test.go +++ b/server/sqlstore/actions_test.go @@ -5,10 +5,12 @@ import ( "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" + "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" - "github.com/mattermost/mattermost/server/public/model" - "github.com/stretchr/testify/require" ) func setupChannelActionStore(t *testing.T, db *sqlx.DB) app.ChannelActionStore { diff --git a/server/sqlstore/category.go b/server/sqlstore/category.go index d67be1a297..2ce8ad2edd 100644 --- a/server/sqlstore/category.go +++ b/server/sqlstore/category.go @@ -4,9 +4,11 @@ import ( "database/sql" sq "github.com/Masterminds/squirrel" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) // playbookStore is a sql store for playbooks. Use NewPlaybookStore to create it. diff --git a/server/sqlstore/category_test.go b/server/sqlstore/category_test.go index 392fa6cdee..4dbde032b8 100644 --- a/server/sqlstore/category_test.go +++ b/server/sqlstore/category_test.go @@ -5,10 +5,12 @@ import ( "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" + "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" - "github.com/mattermost/mattermost/server/public/model" - "github.com/stretchr/testify/require" ) func setupCategoryStore(t *testing.T, db *sqlx.DB) app.CategoryStore { diff --git a/server/sqlstore/migrations.go b/server/sqlstore/migrations.go index 10802527bf..8f647f048a 100644 --- a/server/sqlstore/migrations.go +++ b/server/sqlstore/migrations.go @@ -10,10 +10,12 @@ import ( "github.com/blang/semver" "github.com/go-sql-driver/mysql" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) type Migration struct { diff --git a/server/sqlstore/migrations_utils.go b/server/sqlstore/migrations_utils.go index 1f7c28219d..715f487246 100644 --- a/server/sqlstore/migrations_utils.go +++ b/server/sqlstore/migrations_utils.go @@ -5,10 +5,10 @@ import ( "fmt" "strings" - "github.com/mattermost/mattermost/server/public/model" + "github.com/jmoiron/sqlx" "github.com/pkg/errors" - "github.com/jmoiron/sqlx" + "github.com/mattermost/mattermost/server/public/model" ) // 'IF NOT EXISTS' syntax is not supported in Postgres 9.4, so we need diff --git a/server/sqlstore/playbook.go b/server/sqlstore/playbook.go index 4f40bf084a..63a9f57fc2 100644 --- a/server/sqlstore/playbook.go +++ b/server/sqlstore/playbook.go @@ -8,9 +8,11 @@ import ( "strings" sq "github.com/Masterminds/squirrel" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) type sqlPlaybook struct { diff --git a/server/sqlstore/playbook_run.go b/server/sqlstore/playbook_run.go index b6a6cdf88e..e5e9b85fde 100644 --- a/server/sqlstore/playbook_run.go +++ b/server/sqlstore/playbook_run.go @@ -8,14 +8,14 @@ import ( "strings" "time" + sq "github.com/Masterminds/squirrel" + "github.com/jmoiron/sqlx" + "github.com/pkg/errors" "gopkg.in/guregu/null.v4" - "github.com/jmoiron/sqlx" + "github.com/mattermost/mattermost/server/public/model" - sq "github.com/Masterminds/squirrel" "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" - "github.com/pkg/errors" ) const ( diff --git a/server/sqlstore/playbook_run_test.go b/server/sqlstore/playbook_run_test.go index d49769583b..0c9b29fb06 100644 --- a/server/sqlstore/playbook_run_test.go +++ b/server/sqlstore/playbook_run_test.go @@ -8,17 +8,18 @@ import ( "testing" "time" - "gopkg.in/guregu/null.v4" - sq "github.com/Masterminds/squirrel" "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gopkg.in/guregu/null.v4" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" ) func TestCreateAndGetPlaybookRun(t *testing.T) { diff --git a/server/sqlstore/playbook_test.go b/server/sqlstore/playbook_test.go index bd2b7d5fc8..a12b475e87 100644 --- a/server/sqlstore/playbook_test.go +++ b/server/sqlstore/playbook_test.go @@ -6,15 +6,16 @@ import ( "strconv" "testing" - "gopkg.in/guregu/null.v4" - "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" "github.com/stretchr/testify/require" + "gopkg.in/guregu/null.v4" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" ) func membersFromIDs(ids []string) []app.PlaybookMember { diff --git a/server/sqlstore/pluginapi_client.go b/server/sqlstore/pluginapi_client.go index bd5c06e112..3766205f52 100644 --- a/server/sqlstore/pluginapi_client.go +++ b/server/sqlstore/pluginapi_client.go @@ -3,9 +3,8 @@ package sqlstore import ( "database/sql" - "github.com/mattermost/mattermost/server/public/pluginapi" - "github.com/mattermost/mattermost/server/public/model" + "github.com/mattermost/mattermost/server/public/pluginapi" ) // StoreAPI is the interface exposing the underlying database, provided by pluginapi diff --git a/server/sqlstore/stats.go b/server/sqlstore/stats.go index 013c946daa..9966bd3c9d 100644 --- a/server/sqlstore/stats.go +++ b/server/sqlstore/stats.go @@ -7,11 +7,11 @@ import ( "strconv" "time" + sq "github.com/Masterminds/squirrel" "github.com/pkg/errors" "github.com/sirupsen/logrus" "gopkg.in/guregu/null.v4" - sq "github.com/Masterminds/squirrel" "github.com/mattermost/mattermost/server/public/model" ) diff --git a/server/sqlstore/stats_test.go b/server/sqlstore/stats_test.go index a3f6848c16..92b917b9e6 100644 --- a/server/sqlstore/stats_test.go +++ b/server/sqlstore/stats_test.go @@ -6,12 +6,14 @@ import ( "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" - "github.com/mattermost/mattermost/server/public/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + mock_sqlstore "github.com/mattermost/mattermost-plugin-playbooks/server/sqlstore/mocks" ) func setupStatsStore(t *testing.T, db *sqlx.DB) *StatsStore { diff --git a/server/sqlstore/store.go b/server/sqlstore/store.go index 6931855cab..1e29bbb9af 100644 --- a/server/sqlstore/store.go +++ b/server/sqlstore/store.go @@ -3,13 +3,14 @@ package sqlstore import ( "database/sql" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/sirupsen/logrus" - sq "github.com/Masterminds/squirrel" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + "github.com/sirupsen/logrus" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" ) // maxJSONLength holds the limit we set for JSON data in postgres diff --git a/server/sqlstore/system.go b/server/sqlstore/system.go index 253853cfe0..53778629ce 100644 --- a/server/sqlstore/system.go +++ b/server/sqlstore/system.go @@ -4,8 +4,9 @@ import ( "database/sql" sq "github.com/Masterminds/squirrel" - "github.com/mattermost/mattermost/server/public/model" "github.com/pkg/errors" + + "github.com/mattermost/mattermost/server/public/model" ) // getSystemValue queries the IR_System table for the given key diff --git a/server/sqlstore/timeline_event_test.go b/server/sqlstore/timeline_event_test.go index 3011b25d26..45e909af1c 100644 --- a/server/sqlstore/timeline_event_test.go +++ b/server/sqlstore/timeline_event_test.go @@ -6,9 +6,10 @@ package sqlstore import ( "testing" + "github.com/stretchr/testify/require" + "github.com/mattermost/mattermost-plugin-playbooks/server/app" "github.com/mattermost/mattermost/server/public/model" - "github.com/stretchr/testify/require" ) func TestPlaybookRunStore_CreateTimelineEvent(t *testing.T) { diff --git a/server/sqlstore/user_info.go b/server/sqlstore/user_info.go index fd635071ef..6632ffc199 100644 --- a/server/sqlstore/user_info.go +++ b/server/sqlstore/user_info.go @@ -7,11 +7,12 @@ import ( "database/sql" "encoding/json" + sq "github.com/Masterminds/squirrel" + "github.com/pkg/errors" + "github.com/mattermost/mattermost/server/public/model" - sq "github.com/Masterminds/squirrel" "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/pkg/errors" ) type sqlUserInfo struct { diff --git a/server/sqlstore/user_info_test.go b/server/sqlstore/user_info_test.go index 1b6676bf4c..8c549e7a92 100644 --- a/server/sqlstore/user_info_test.go +++ b/server/sqlstore/user_info_test.go @@ -7,16 +7,16 @@ import ( "reflect" "testing" - mock_app "github.com/mattermost/mattermost-plugin-playbooks/server/app/mocks" - - "github.com/pkg/errors" - sq "github.com/Masterminds/squirrel" "github.com/golang/mock/gomock" "github.com/jmoiron/sqlx" - "github.com/mattermost/mattermost-plugin-playbooks/server/app" - "github.com/mattermost/mattermost/server/public/model" + "github.com/pkg/errors" "github.com/stretchr/testify/require" + + "github.com/mattermost/mattermost/server/public/model" + + "github.com/mattermost/mattermost-plugin-playbooks/server/app" + mock_app "github.com/mattermost/mattermost-plugin-playbooks/server/app/mocks" ) func Test_userInfoStore_Get(t *testing.T) { diff --git a/server/tabapp.go b/server/tabapp.go index 5f2756bf3e..52f2d1eb8c 100644 --- a/server/tabapp.go +++ b/server/tabapp.go @@ -5,12 +5,12 @@ import ( "os" "path/filepath" + "github.com/MicahParks/keyfunc/v3" "github.com/pkg/errors" + "github.com/sirupsen/logrus" - "github.com/MicahParks/keyfunc/v3" "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/pluginapi" - "github.com/sirupsen/logrus" "github.com/mattermost/mattermost-plugin-playbooks/server/config" ) diff --git a/webapp/src/components/backstage/rhs/rhs.tsx b/webapp/src/components/backstage/rhs/rhs.tsx index 21b1fe8269..5161517776 100644 --- a/webapp/src/components/backstage/rhs/rhs.tsx +++ b/webapp/src/components/backstage/rhs/rhs.tsx @@ -65,7 +65,7 @@ const Container = styled.div<{isOpen: boolean, viewMode: BackstageRHSViewMode}>` flex-direction: column; border-left: 1px solid rgba(var(--center-channel-color-rgb), 0.08); right: 0; - top: 40px; + top: 45px; z-index: 5; background-color: var(--center-channel-bg); diff --git a/webapp/src/components/backstage/status_badge.tsx b/webapp/src/components/backstage/status_badge.tsx index aae22261fd..2e0dedc8e3 100644 --- a/webapp/src/components/backstage/status_badge.tsx +++ b/webapp/src/components/backstage/status_badge.tsx @@ -26,7 +26,7 @@ const Badge = styled.div` font-weight: 600; margin: 2px; - color: var(--sidebar-text); + color: var(--button-color); ${(props) => { switch (props.status) { diff --git a/webapp/src/components/rhs/rhs_run_list.tsx b/webapp/src/components/rhs/rhs_run_list.tsx index 27b249f1f8..04f808c34c 100644 --- a/webapp/src/components/rhs/rhs_run_list.tsx +++ b/webapp/src/components/rhs/rhs_run_list.tsx @@ -307,12 +307,13 @@ const TitleContainer = styled.div` const VerticalLine = styled.div` opacity: 0.16; - border: 1px solid var(--center-channel-color); + border-left: 1px solid var(--center-channel-color); height: 24px; `; const ChannelNameText = styled.div` color: rgba(var(--center-channel-color-rgb), 0.56); + font-family: "Open Sans", sans-serif; font-weight: 400; font-size: 12px; line-height: 20px; diff --git a/webapp/src/manifest.test.tsx b/webapp/src/manifest.test.tsx index 9026833e39..d71f2d41e1 100644 --- a/webapp/src/manifest.test.tsx +++ b/webapp/src/manifest.test.tsx @@ -4,4 +4,4 @@ test('Plugin manifest, id and version are defined', () => { expect(manifest).toBeDefined(); expect(manifest.id).toBeDefined(); expect(manifest.version).toBeDefined(); -}); \ No newline at end of file +});