From 79c240cde7d6d71915d6b8df89899e0836a65ede Mon Sep 17 00:00:00 2001 From: Doug Lauder Date: Tue, 5 Nov 2024 15:54:50 -0500 Subject: [PATCH] fix module paths after move to mattermost-community (#228) --- .golangci.yml | 2 +- CHANGELOG.md | 2 +- README.md | 6 +++--- go.mod | 3 ++- go.sum | 4 +++- plugin.json | 6 +++--- server/api/api.go | 2 +- server/api/api_test.go | 2 +- server/autolink/autolink_test.go | 4 ++-- server/autolink/lib_credit_card_test.go | 2 +- server/autolink/lib_jira_test.go | 2 +- server/autolink/lib_productboard_test.go | 2 +- server/autolinkclient/client.go | 2 +- server/autolinkclient/client_test.go | 2 +- server/autolinkplugin/command.go | 2 +- server/autolinkplugin/config.go | 2 +- server/autolinkplugin/config_test.go | 2 +- server/autolinkplugin/plugin.go | 2 +- server/autolinkplugin/plugin_test.go | 2 +- server/main.go | 2 +- 20 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 23fba27c..ba3f9c88 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,7 +9,7 @@ linters-settings: gofmt: simplify: true goimports: - local-prefixes: github.com/mattermost/mattermost-plugin-autolink + local-prefixes: github.com/mattermost-community/mattermost-plugin-autolink govet: check-shadowing: true enable-all: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 56dcb76c..ece49a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ # Changelog -The changelog can be found at https://github.com/mattermost/mattermost-plugin-autolink/releases. +The changelog can be found at https://github.com/mattermost-community/mattermost-plugin-autolink/releases. diff --git a/README.md b/README.md index cf202986..dbf473b7 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ [![Build Status](https://img.shields.io/circleci/project/github/mattermost/mattermost-plugin-autolink/master.svg)](https://circleci.com/gh/mattermost/mattermost-plugin-autolink) [![Code Coverage](https://img.shields.io/codecov/c/github/mattermost/mattermost-plugin-autolink/master.svg)](https://codecov.io/gh/mattermost/mattermost-plugin-autolink) -[![Release](https://img.shields.io/github/v/release/mattermost/mattermost-plugin-autolink)](https://github.com/mattermost/mattermost-plugin-autolink/releases/latest) -[![HW](https://img.shields.io/github/issues/mattermost/mattermost-plugin-autolink/Up%20For%20Grabs?color=dark%20green&label=Help%20Wanted)](https://github.com/mattermost/mattermost-plugin-autolink/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Up+For+Grabs%22+label%3A%22Help+Wanted%22) +[![Release](https://img.shields.io/github/v/release/mattermost/mattermost-plugin-autolink)](https://github.com/mattermost-community/mattermost-plugin-autolink/releases/latest) +[![HW](https://img.shields.io/github/issues/mattermost/mattermost-plugin-autolink/Up%20For%20Grabs?color=dark%20green&label=Help%20Wanted)](https://github.com/mattermost-community/mattermost-plugin-autolink/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Up+For+Grabs%22+label%3A%22Help+Wanted%22) **Maintainer:** [@levb](https://github.com/levb) **Co-Maintainer:** [@iomodo](https://github.com/iomodo) @@ -26,7 +26,7 @@ Use it to add custom auto-linking on your Mattermost system, such as adding link ## Configuration 1. Go to **System Console > Plugins > Plugin Management** and click **Enable** to enable the Autolink plugin. - - If you are running Mattermost v5.11 or earlier, you must first go to the [releases page of this GitHub repository](https://github.com/mattermost/mattermost-plugin-autolink), download the latest release, and upload it to your Mattermost instance [following this documentation](https://docs.mattermost.com/administration/plugins.html#plugin-uploads). + - If you are running Mattermost v5.11 or earlier, you must first go to the [releases page of this GitHub repository](https://github.com/mattermost-community/mattermost-plugin-autolink), download the latest release, and upload it to your Mattermost instance [following this documentation](https://docs.mattermost.com/administration/plugins.html#plugin-uploads). 2. Modify your `config.json` file to include the types of regexp patterns you wish to match, under the `PluginSettings`. See below for an example of what this should look like. diff --git a/go.mod b/go.mod index 036cced8..e11328d9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/mattermost/mattermost-plugin-autolink +module github.com/mattermost-community/mattermost-plugin-autolink go 1.21 @@ -23,6 +23,7 @@ require ( github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 // indirect github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956 // indirect diff --git a/go.sum b/go.sum index a8ccb111..89a0aa37 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -86,8 +87,9 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= diff --git a/plugin.json b/plugin.json index 22217750..f08e3647 100644 --- a/plugin.json +++ b/plugin.json @@ -2,8 +2,8 @@ "id": "mattermost-autolink", "name": "Autolink", "description": "Automatically rewrite text matching a regular expression into a Markdown link.", - "homepage_url": "https://github.com/mattermost/mattermost-plugin-autolink", - "support_url": "https://github.com/mattermost/mattermost-plugin-autolink/issues", + "homepage_url": "https://github.com/mattermost-community/mattermost-plugin-autolink", + "support_url": "https://github.com/mattermost-community/mattermost-plugin-autolink/issues", "icon_path": "assets/icon.svg", "min_server_version": "5.16.0", "server": { @@ -17,7 +17,7 @@ "executable": "" }, "settings_schema": { - "header": "Configure this plugin directly in the config.json file, or using the /autolink command. Learn more [in our documentation](https://github.com/mattermost/mattermost-plugin-autolink/blob/master/README.md).\n\n To report an issue, make a suggestion, or contribute, [check the plugin repository](https://github.com/mattermost/mattermost-plugin-autolink).", + "header": "Configure this plugin directly in the config.json file, or using the /autolink command. Learn more [in our documentation](https://github.com/mattermost-community/mattermost-plugin-autolink/blob/master/README.md).\n\n To report an issue, make a suggestion, or contribute, [check the plugin repository](https://github.com/mattermost-community/mattermost-plugin-autolink).", "footer": "", "settings": [ { diff --git a/server/api/api.go b/server/api/api.go index 06cff29d..c7ae84d2 100644 --- a/server/api/api.go +++ b/server/api/api.go @@ -7,7 +7,7 @@ import ( "github.com/gorilla/mux" "github.com/pkg/errors" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) type Store interface { diff --git a/server/api/api_test.go b/server/api/api_test.go index faca9f9f..6db570b6 100644 --- a/server/api/api_test.go +++ b/server/api/api_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) type authorizeAll struct{} diff --git a/server/autolink/autolink_test.go b/server/autolink/autolink_test.go index bf5128e6..606a2874 100644 --- a/server/autolink/autolink_test.go +++ b/server/autolink/autolink_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" - "github.com/mattermost/mattermost-plugin-autolink/server/autolinkplugin" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolinkplugin" ) func setupTestPlugin(t *testing.T, l autolink.Autolink) *autolinkplugin.Plugin { diff --git a/server/autolink/lib_credit_card_test.go b/server/autolink/lib_credit_card_test.go index 98004c17..b4583c79 100644 --- a/server/autolink/lib_credit_card_test.go +++ b/server/autolink/lib_credit_card_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) const ( diff --git a/server/autolink/lib_jira_test.go b/server/autolink/lib_jira_test.go index aba9a78a..6eb0f0ba 100644 --- a/server/autolink/lib_jira_test.go +++ b/server/autolink/lib_jira_test.go @@ -3,7 +3,7 @@ package autolink_test import ( "testing" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) var jiraTests = []linkTest{ diff --git a/server/autolink/lib_productboard_test.go b/server/autolink/lib_productboard_test.go index 8b2df4b5..262c5522 100644 --- a/server/autolink/lib_productboard_test.go +++ b/server/autolink/lib_productboard_test.go @@ -3,7 +3,7 @@ package autolink_test import ( "testing" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) var productboardLink = autolink.Autolink{ diff --git a/server/autolinkclient/client.go b/server/autolinkclient/client.go index c59ed4e4..3babaddc 100644 --- a/server/autolinkclient/client.go +++ b/server/autolinkclient/client.go @@ -7,7 +7,7 @@ import ( "io" "net/http" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) const autolinkPluginID = "mattermost-autolink" diff --git a/server/autolinkclient/client_test.go b/server/autolinkclient/client_test.go index 0e9a13cc..11d8ea0c 100644 --- a/server/autolinkclient/client_test.go +++ b/server/autolinkclient/client_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) func TestRoundTripper(t *testing.T) { diff --git a/server/autolinkplugin/command.go b/server/autolinkplugin/command.go index a03485ef..454ea99d 100644 --- a/server/autolinkplugin/command.go +++ b/server/autolinkplugin/command.go @@ -9,7 +9,7 @@ import ( "github.com/mattermost/mattermost/server/public/plugin" "github.com/pkg/errors" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) const ( diff --git a/server/autolinkplugin/config.go b/server/autolinkplugin/config.go index adb04550..58cc3a37 100644 --- a/server/autolinkplugin/config.go +++ b/server/autolinkplugin/config.go @@ -9,7 +9,7 @@ import ( "github.com/mattermost/mattermost/server/public/plugin" "github.com/pkg/errors" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) // Config from config.json diff --git a/server/autolinkplugin/config_test.go b/server/autolinkplugin/config_test.go index fe10a49b..deb27e54 100644 --- a/server/autolinkplugin/config_test.go +++ b/server/autolinkplugin/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) func TestOnConfigurationChange(t *testing.T) { diff --git a/server/autolinkplugin/plugin.go b/server/autolinkplugin/plugin.go index 35abdf44..b4469471 100644 --- a/server/autolinkplugin/plugin.go +++ b/server/autolinkplugin/plugin.go @@ -11,7 +11,7 @@ import ( "github.com/mattermost/mattermost/server/public/shared/markdown" "github.com/pkg/errors" - "github.com/mattermost/mattermost-plugin-autolink/server/api" + "github.com/mattermost-community/mattermost-plugin-autolink/server/api" ) // Plugin the main struct for everything diff --git a/server/autolinkplugin/plugin_test.go b/server/autolinkplugin/plugin_test.go index ee545fda..0840143b 100644 --- a/server/autolinkplugin/plugin_test.go +++ b/server/autolinkplugin/plugin_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/mattermost/mattermost-plugin-autolink/server/autolink" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolink" ) func TestPlugin(t *testing.T) { diff --git a/server/main.go b/server/main.go index d207bdeb..c2ecc2e2 100644 --- a/server/main.go +++ b/server/main.go @@ -3,7 +3,7 @@ package main import ( "github.com/mattermost/mattermost/server/public/plugin" - "github.com/mattermost/mattermost-plugin-autolink/server/autolinkplugin" + "github.com/mattermost-community/mattermost-plugin-autolink/server/autolinkplugin" ) func main() {