GithubHelp home page GithubHelp logo

mattermost-community / mattermost-plugin-confluence Goto Github PK

View Code? Open in Web Editor NEW
14.0 29.0 15.0 600 KB

A Mattermost Plugin to receive events from Confluence

License: Apache License 2.0

Makefile 6.34% HTML 0.06% Go 70.10% JavaScript 23.38% TypeScript 0.13%
hacktoberfest mattermost mattermost-plugin

mattermost-plugin-confluence's Introduction

Disclaimer

This repository is community supported and not maintained by Mattermost. Mattermost disclaims liability for integrations, including Third Party Integrations and Mattermost Integrations. Integrations may be modified or discontinued at any time.

Contents

Mattermost Plugin for Confluence

Build Status Code Coverage Release HW

Overview

A Mattermost plugin for Confluence. Supports Confluence Cloud, Server, and Data Center versions, as well as environments with multiple Confluence servers. This plugin helps your teams collaborate and keep in sync as Confluence Pages and Spaces get updated. Comments and activity can be pushed into specific Mattermost channels for full visibility.

Features

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.

Configure notifications

  • The Alias (Subscription Name) is intended to be an easy to remember name for the subscription. You will use this name when you need to edit the configuration again.

  • Confluence Base URL is the URL of the Confluence server this rule is intended to come from. The Confluence server must have been setup by an administrator with Mattermost using the /confluence install command prior to using it in a subscription.

  • Subscribe To is used to specify if they want to follow events for a Page or a Space object.

  • Space Key is the Confluence space key used for the project, often it is 2-4 characters, such as "PROJ" or "MM" and is unique for each Space on that Confluence server.

  • Page ID is the ID of the Page object on Confuence. Since a page name can be changed by users, the underlying PageID is used to ensure tracking continues even if the page is renamed. The pageID of a Confluence page can be found by going to the "..." menu on the page, then selecting Page Info. The URL will then show the PageID in the URL at the end.

    image

  • 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.

Example of a configured notification:

image

/confluence subscribe

Show a list of all the subscriptions set for the current channel. When you need to see what subscription rules are setup for a channel, you can run /confluence list to see a list of the configured subscriptions.

image

/confluence edit

Edit existing subscription settings. To change the subscription settings, you need to pass over the subscription name to edit. If you have spaces in your subscription names, you need to wrap them in quotation marks.

For example: /confluence edit "Project A Subscription"

To display a list of all the subscription names in the channel, type /confluence list then use the subscription names to edit the correct rule.

image

/confluence unsubscribe

Stop receiving notifications to a channel. To stop receiving notifications to a channel, use the unsubscribe command to specify the subscription that should be unsubscribed. example: /confluence unsubscribe "Project A Subscription".

Development

This plugin contains both a server and web app portion. Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.

Releasing new versions

The version of a plugin is determined at compile time, automatically populating a version field in the plugin manifest:

  • If the current commit matches a tag, the version will match after stripping any leading v, e.g. 1.3.1.
  • Otherwise, the version will combine the nearest tag with git rev-parse --short HEAD, e.g. 1.3.1+d06e53e1.
  • If there is no version tag, an empty version will be combined with the short hash, e.g. 0.0.0+76081421.

To disable this behaviour, manually populate and maintain the version field.

mattermost-plugin-confluence's People

Contributors

jatinkksharma avatar chetanyakan avatar hanzei avatar mickmister avatar jfrerich avatar dependabot[bot] avatar cwarnermm avatar ayusht2810 avatar aaronrothschild avatar phoinixgrr avatar toninis avatar justinegeffen avatar imkrishnasarathi avatar levb avatar goldsziggy avatar spirosoik avatar

Stargazers

Saturnino Abril avatar Ya-Che Li avatar Ssynchronicity avatar  avatar There Is No TIme avatar Victor avatar Dinh Ngoc Hien avatar Kirill Krasnov avatar  avatar Juan Pablo Prado avatar  avatar  avatar Dennis K avatar  avatar

Watchers

Jesús Espino avatar James Cloos avatar Muhammad S. avatar Maria A Nunez avatar Christopher Poile avatar Daniel Espino García avatar Stavros Foteinopoulos avatar William Gathoye avatar Gabe Jackson avatar Mir Shahriar Sabuj avatar Doug Lauder avatar Elias Nahum avatar Corey R avatar Tanmay Singh avatar Pablo Vélez avatar Asaad Mahmood avatar Scott Bishel avatar Nathaniel Allred avatar Ben Cooke avatar  avatar na avatar Hossein avatar Maxwell Power avatar Rajat Dabade avatar  avatar ktorkura avatar  avatar Ihor_Tryhub avatar  avatar

mattermost-plugin-confluence's Issues

Add per user Authentication for Confluence

Currently, the confluence plugin has no per user authentication - so that will be one of the features we'd like to work on. Then specific users could be notified via MM when one of their watched pages is updated.

Additionally, the user creating the subscription should then be limited to selecting only pages that they are permitted access to view with their account.

Set default confluence URL to reduce user typing

potential enhancement to the plugin would be the ability to set the "Confluence URL" on the Plugin Configuration level if companies only have one confluence site. This would then remove the users need to enter it

Even better, show a dropdown of the installed confluence server URL's available to the user.

Documentation

Can you describe the features of this plugin?

I don't know – without looking into the Code – what this plugin can do for me and why I should install it.

GitBook read-me improvements for installation

We should consider making the following changes to clarify the installation process in the GitBook

A. On server when directing users to managing applications Settings > Apps > Manage Apps Should say Settings > Atlasian Marketplace > Manage Apps.

B. On server install there is a step for: Choose Settings at the bottom of the page, enable development mode, and apply the change. Development mode allows you to install apps from outside of the Atlassian Marketplace.
This is not applicable to server instances and no such change is needed for the installation. Please remove.

C. On Server install the following steps are listed:
1. Upload the OBR file you downloaded earlier.
2. Once the app is installed, press Configure to open the configuration page.

Please add info to step 1. explicitly telling not to add my from URL yet in this modal. Since I've already seen this value earlier it is confusing to me if I should just save it in the field along with the uploaded file.

Support notifications to users "watching" in Confluence

Summary

To receive notifications about something in Confluence, users often start "watching" to subscribe to its updates. The task here is to send a DM to each person watching.

Note that the OAuth foundation needs to be implemented first. Ticket for this here: #49

Allow user to delete a subscription via slash command

Currently there is no way to Delete or deactivate a subscription once you've created it in the channel.

Since this functionality does not exist, and space/page IDs can't be edited the only way to stop the events is to remove all events from the existing subscription.

We should be able to delete subscriptions via a slash command.

Plugin crashes on 5.28.1

Hi,

The latest plugin release 1.2.0 crashes after upgrade to Mattermost 5.28.1. I can enable it and view the help with /confluence help but then if I try to install a new Confluence server with /confluence install server it fails with this and does not react to any commands anymore. Turning on DEBUG logging didn't show any additional messages.

2020-10-31T11:50:23.620-0400    info    [email protected]/stream.go:15   2020/10/31 11:50:23 RPC call to GetConfig API failed: reading body gob: bad data: field numbers out of bounds   {"plugin_id": "com.mattermost.confluence", "source": "plugin_stderr"}

2020-10-31T11:50:23.620-0400    info    [email protected]/stream.go:15   2020/10/31 11:50:23 RPC call to SendEphemeralPost API failed: connection is shut down   {"plugin_id": "com.mattermost.confluence", "source": "plugin_stderr"}

Maybe there is an API change in the new server?

Thanks,
Ilya

Make subscription name case insensitive in slash commands

When using slash commands the subscription will not be found if the the capitalization of the alias does not match. This can become frustrating to use.

When passing in an alias in a slash command, it would be better if these were case insensitive.

Subscriptions events for a page include page events which are not functional

When creating a subscription to a page, other page events are available to subscribe to (Page Create, Page Update, Page Trash etc...). I'm not sure if these should be there.

Since they are listed, I assumed they would deliver events for other pages created below the target page in the hierarchy. But this does not work.

Steps:

  • Create a page A
  • Create a page subscription to page A
  • Add Page event such as Page Create
  • In confluence, Create page B below the page A in the hierarchy
    Observed: No event is delivered
    Expected: not sure..
    A. Page events on a page subscription should capture events for any pages made below target page you are subscribing to.
    or
    B. When you select Page and the subscription type, page events should not be listed.

Update Help Text for sysadmin vs non-sysadmin.

This request is to implement the following changes:

1 Allow non-sysadmin users to run the following commands:

  • /confluence list

This is the only command that will be allowed for non-sysadmin users

2 Update help text message

The current message can be seen below but is incorrect. Give the change mentioned above, please modify the help text to move the following below the For System Administrators Section and above the Setup Instructions

  • /confluence subscribe
  • /confluence unsubscribe
  • /confluence edit

image

3 update autocomplete commands to show commands based on user permissions (admin, non-admin).

The following conversation was captured in the Plugin: Confluence Mattermost Channel

@ahmad.danial @aaron.rothschild and I discussed this in our team meeting this morning. We will investigate the option for allowing reduced restrictions for handling subscriptions, but for now, the user will need to contact the system admin to add or edit subscriptions.

What we will do for now is update the help text to show only the available commands for sysadmin versus non-sysadmin users.

We will also allow the non-sysadmins to run /confluence list

How does that sound?

Issue created from a Mattermost message by @jfrerich.

Editing subscriptions only allows you to edit events

Ideally the edit functionality should allow you to edit all details of the subscription.

At the least, user should be able to edit the alias and page/space ID. this would allows users to correct errors if they make a subscription for the wrong page or space.

Steps:

  • Create a subscription
  • Open the Edit modal
    Observed: Only the events can be edited

Add bot functionality like the Jira plugin

As a user I'd like to be notified of updates to documents I've worked on and comments on documents I've worked on or been tagged in.

Propose we add functionality to the Confluence plugin to have a bot just like the Jira plugin that could notify users of these kinds of updates.

Subscriptions cannot be restricted to Sysadmin Role

There is no way to limit access to create subscriptions to the sysadmin role. This should be implemented.
Since there is no user mapping and permission checking on the Atlasian side, we should at least have the ability to restrict the functionality on the Mattermost side.

Add autocomplete icon

Since v5.24 slash commands can provide an svg via AutocompleteIconData in model.Command that is then shown in the autocomplete list. This ticket is about adding the icon in assets to the slash command.

Include screenhots from a dark and a bright theme in the PR description, as there might be the need for a separate icon with a white background for autocomplete.

Similar PRs:
For GitHub plugin mattermost/mattermost-plugin-github#359
For Jira plugin mattermost/mattermost-plugin-jira#653

Webapp-side of plugin errors out on deploy

This error occurs in the browser when the plugin is deployed:

You attempted to set the key `display_name` with the value `""` on an object that is meant to be immutable and has been frozen.

The error itself is unrelated to the plugin's code, and occurs on the call to registerReducer. This was fixed in the Jira plugin by moving the registerReducer call to the top of initialize, but it still happens intermittently in the Jira plugin.

The call is already at the top of initialize in this plugin, so that fix can not be applied. Instead I think we should just ignore the error specifically if this is the error that occurs.

Add instructions to modal UI for page ID

Ideally the subscribe modal would contain some explanation of what goes into the ID field.

There is not much space to work with but ideally there could be text explaining that the ID is numerical and how to find it.

/confluence commands can only be run by a system administrator.

Normal user can't use /confluence xxx ,it said "/confluence commands can only be run by a system administrator"

How to grant to Normal users or team admin the permission to use /confluence

mattermost version:5.34.2
confluence plugon:1.2.0
conflucen version:server 7.0.5

Add Telemetry tracking so we can make better product decisions

  • Count how many cloud vs server vs data center instances are auth'd with the plugin so we can figure out if we need to build out the cloud based plugin on Confluence.
  • Count how many subscriptions rules are setup so we can figure out how much the plugin is used.
  • Count how many notifications the plugin has processed/posted so we have a general idea of how much usage the plugin is getting.

As always, do not collect any PII nor data that may be sensitive. These are just 'counts" of usage, so shouldn't be a problem.

@jfrerich Let's consider adding this before release.

Server URLs should be picked from a user friendly list

Pasting a server url each time creating a subscription is not user friendly. Admins should be able to maintain a list of server name / server URL mappings. Users should then be able to pick from this list in case more than one mapping is configured.

Integrate GolangCI-Lint

Mattermost is currently in the process of using golangci-lint as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:

  1. Copy .golangci.yml from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  2. Copy Makefile from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  3. Copy build/ from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  4. Run go mod tidy and make dist to ensure the build system works fine.
  5. Update linters-settings.goimports.local-prefixes to the go module path i.e. to github.com/mattermost/mattermost-plugin-aws-SNS.
  6. Run make golangci-lint and fix all issues that arise.

Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules is needed. If you don't know how to resolve an error, please reach out to @hanzei on the Mattermost Community Server or ask the question here.

MM-47046 Use version of React DOM provided by web app

From here:

"For some more context, see here. The short version though is that we updated the web app to React 17, and there's a chance that plugins will have some issues with it because they're compiled with the React 16 version of ReactDOM. I'm submitting PRs to the 3 products, the demo plugin, and the plugin template to have them use the web app's version of React DOM to fix any immediate issues, but we'll want to properly migrate them to React 17 going forward."

Ticket Link
https://mattermost.atlassian.net/browse/MM-47046

Related Pull Requests
mattermost/mattermost-plugin-playbooks#1489
mattermost/focalboard#3861
mattermost-community/mattermost-plugin-todo#190
mattermost/mattermost-plugin-starter-template#169

Handle React warnings regarding non-DOM properties

There are warnings being printed to the console in the browser when running /confluence subscribe, like the following:

Warning: React does not recognize the `addValidation` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `addvalidation` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

There are some properties being passed to DOM elements that are part of the plugin's logic, that are not supported by the native DOM elements. The task here is to avoid sending these props to the DOM elements.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.