Coder Social home page Coder Social logo

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

View Code? Open in Web Editor NEW
14.0 28.0 14.0 742 KB

A Mattermost Plugin to receive events from Confluence

License: Apache License 2.0

Makefile 6.34% HTML 0.06% Go 70.08% JavaScript 23.39% TypeScript 0.13%
hacktoberfest mattermost mattermost-plugin

mattermost-plugin-confluence's People

Contributors

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-plugin-confluence's Issues

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.

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

/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

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

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.

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

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.

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.

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

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.

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.

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

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

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.

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.

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.

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.

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

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.

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.

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.

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.