From 706dd3b1cae6ab5a5ed8353dd887d63915b24761 Mon Sep 17 00:00:00 2001 From: ayusht2810 Date: Mon, 12 Feb 2024 14:06:42 +0530 Subject: [PATCH 1/3] Updated the readme --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 717afba..39f6deb 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,17 @@ A Mattermost plugin for Confluence. Supports Confluence Cloud, Server, and Data With the Confluence plugin, you can subscribe to a variety of events in Confluence, and specify which channels the associated notifications will appear in. - In a Mattermost channel, setup subscriptions to get updates from Confluence and manage your notification subscriptions directly within Mattermost. -- Notify a channel whenever something occurs on a Confluence object: - - Confluence spaces, including those created, updated, deleted, and restored, and those with added comments. - - Confluence pages, including those created, updated, deleted, restored, and those with added, deleted, or updated comments. +- Notify a channel whenever something occurs on a Confluence object, we support the following events: + - space_updated + - page_created + - page_restored + - page_trashed + - page_updated + - comment_created + - comment_updated +- User can only create the subscriptions for the spaces and pages for which they have permissions to and the same for the notifications too. +- Admins can change permissions for both mattermost and confluence side from the plugin configuration. + ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/90389917/f7e70d82-157b-4dc8-aa0a-868b115f2cb4) ## Configure notifications @@ -46,9 +54,13 @@ With the Confluence plugin, you can subscribe to a variety of events in Confluen ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/74422101/9314abd2-8562-456e-9661-7f23c91db206) - `Events` are the internal confluence events that will trigger a notification from Confluence. The following events are currently included: - - Confluence spaces, including those created, updated, deleted, and restored, and those with added comments. - - Confluence pages, inlcuidng those created, updated, deleted, restored, and those with added, deleted, or updated comments. - + - space_updated + - page_created + - page_restored + - page_trashed + - page_updated + - comment_created + - comment_updated Example of a configured notification: ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/74422101/33bc67f8-8d36-4e79-a386-7791f4dcd1ee) From a56bdab4240d408b72db2386a195796f79cb79c4 Mon Sep 17 00:00:00 2001 From: ayusht2810 Date: Mon, 12 Feb 2024 15:37:46 +0530 Subject: [PATCH 2/3] fixed review comments --- README.md | 6 +++--- plugin.json | 2 +- server/manifest.go | 2 +- webapp/src/manifest.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 39f6deb..74652f4 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ With the Confluence plugin, you can subscribe to a variety of events in Confluen - page_updated - comment_created - comment_updated -- User can only create the subscriptions for the spaces and pages for which they have permissions to and the same for the notifications too. -- Admins can change permissions for both mattermost and confluence side from the plugin configuration. - ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/90389917/f7e70d82-157b-4dc8-aa0a-868b115f2cb4) +- Users can only create subscriptions for the spaces and pages for which they have permission and same for the notifications as well. +- Admins can change permissions for both Mattermost and Confluence side from the plugin configuration. + ![image](https://github.com/Brightscout/mattermost-plugin-confluence-fork/assets/90389917/b94fbf84-f345-4ded-aa8d-21de1b870062) ## Configure notifications diff --git a/plugin.json b/plugin.json index e0c0486..365cb7f 100644 --- a/plugin.json +++ b/plugin.json @@ -33,7 +33,7 @@ "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [ diff --git a/server/manifest.go b/server/manifest.go index c3488dd..1a447dc 100644 --- a/server/manifest.go +++ b/server/manifest.go @@ -49,7 +49,7 @@ const manifestStr = ` "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [ diff --git a/webapp/src/manifest.js b/webapp/src/manifest.js index 828e7e7..612972a 100644 --- a/webapp/src/manifest.js +++ b/webapp/src/manifest.js @@ -38,7 +38,7 @@ const manifest = JSON.parse(` "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [ From bdf052867e635731b79a07d6c7a17f969583ffe3 Mon Sep 17 00:00:00 2001 From: ayusht2810 Date: Mon, 12 Feb 2024 17:00:06 +0530 Subject: [PATCH 3/3] Fixed lint errors --- .golangci.yml | 1 - server/get_subscription.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 2c93dfe..a0d4170 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,6 @@ linters: - ineffassign - misspell - nakedret - - revive - staticcheck - stylecheck - typecheck diff --git a/server/get_subscription.go b/server/get_subscription.go index 7ea4627..86c48b5 100644 --- a/server/get_subscription.go +++ b/server/get_subscription.go @@ -10,7 +10,7 @@ import ( ) var GetChannelSubscription = &Endpoint{ - RequiresAdmin: true, + RequiresAdmin: false, Path: "/{channelID:[A-Za-z0-9]+}/subscription", Method: http.MethodGet, Execute: handleGetChannelSubscription,