-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GH-85,84,71,49] Confluence Phase-2 (Authorisation/Notifications) #89
base: master
Are you sure you want to change the base?
[GH-85,84,71,49] Confluence Phase-2 (Authorisation/Notifications) #89
Conversation
* MI-1721: WIP * MI-1721: WIP * MI-1721: Fixed GetClient function * MI-1721: WIP * [MI-1751]:Added Logic to create webhook for connecting to confluence server * MI-1721: Added OAuth2.0 for confluence server and cloud * MI-1721: Done some code refactoring * [MI-1772]:WIP:Working on Notifications * [MI-1751]:Fixed Review fixes * [MI-1751]:[WIP]:Added Notifications for server * [MI-1772]:[WIP]:refactoring code * [MI-1772]:Fixed Self Review fixes * [MI-1772]:Fixed Review fixes * [MI-1794][WIP]:Added Notifications for Confluence Cloud * [MI-1794]:Added Confluence Cloud Notification * [MI-1794]:Self review fixes * [MI-1788]:Completed Notifications for Confluence Server * [MI-1788]:Self Review Fixes * [MI-1811]:Fixed Unsubscribe command * [MI-1811]:Self review fixes * [MI-1814]:Added /edit Command in confluence Plugin * [MI-1794]:Fixed Review fixes * [MI-1822][WIP]:wrote some test cases * [MI-1826]:Added Permissions for who can create/edit/delete the subscriptions * [MI-1826]:Fixed review fixes * [MI-1788]:Fixed Review fixes * [MI-1811]:Fixed review fixes * [MI-1788]:Removed Kv store Admin Funtions * [MI-1814]:Fixed review fixes * [MI-1822]:Updated the test cases * [MI-1834][WIP]:Fixing bugs * [MI-1834]:self review fixes * [MI-1834]:review fixes done * [MI-1826]:review fixes done * [MI-1814]:review fixes done * [MI-1811]:review fixes done * [MI-1842]:Added test cases for Oauth flow * [MI-1842]:self review fixes * [MI-1842]:added yml files * [MI-1721]:fixed review fixes * [MI-1849]:fixed bug fixes * [MI-1849]:fixed templates * [MI-1849]:fixed review fixes * [MI-1853]:fixed linting errors * [MI-1853]:Fixed and removed lint erros * [MI-1853]:self review fixes * [MI-1853]:fixed linters in github actions * [MI-1853]:fixes goimports error * [MI-1853]:fix lint errors in webapp * [MI-1853]:fixed webapp test cases * [MI-1853]:Fixed circleCI error * [MI-1853]:fixed Circle lint error * [MI-1853]:Ran go mod tidy * [MI-1853]:fixed go.mod file * [MI-1853]:fixed go.mod and go.sum * [MI-1853]:fixed review fixes * [MI-1721]:fixed review fixes * [MI-1751]:Added Logic to create webhook for connecting to confluence server (#1) * [MI-1751]:Added Logic to create webhook for connecting to confluence server * [MI-1751]:Fixed Review fixes * [MI-1772]:Added logic for server side notifications for confluence (#3) * [MI-1772]:WIP:Working on Notifications * [MI-1751]:[WIP]:Added Notifications for server * [MI-1772]:[WIP]:refactoring code * [MI-1772]:Fixed Self Review fixes * [MI-1772]:Fixed Review fixes * [MI-1772]:fixed review fixes * [MI-1794]:Added Notifications for Confluence Cloud (#4) * [MI-1794][WIP]:Added Notifications for Confluence Cloud * [MI-1794]:Added Confluence Cloud Notification * [MI-1794]:Self review fixes * [MI-1794]:Fixed Review fixes * [MI-1794]:fixed review fixes * [MI-1794]:fixed review fixes * [MI-1788]:Created Notifications for Confluence Server(webhook per user) (#5) * [MI-1788]:Completed Notifications for Confluence Server * [MI-1788]:Self Review Fixes * [MI-1788]:Fixed Review fixes * [MI-1788]:Removed Kv store Admin Funtions * [MI-1811]:Added Logic for Unsubscribe Command (#6) * [MI-1811]:Fixed Unsubscribe command * [MI-1811]:Self review fixes * [MI-1811]:Fixed review fixes * [MI-1811]:review fixes done * [MI-1814]:Added /edit Command in confluence Plugin (#7) * [MI-1814]:Added /edit Command in confluence Plugin * [MI-1814]:Fixed review fixes * [MI-1814]:review fixes done * [MI-1814]:fixed review fixes * [MI-1822]:Updated the Test cases for Confluence Plugin (#9) * [MI-1822][WIP]:wrote some test cases * [MI-1822]:Updated the test cases * [MI-1822]:fixed review fixes * [MI-1822]:fixed review fixes Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: Shivam Chauhan <[email protected]> * [MI-1721]:fixed circle error * [MI-1721]:fixed frontend linters Co-authored-by: Kshitij Katiyar <[email protected]> Co-authored-by: kshitij katiyar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @Kshitij-Katiyar 👍
I've reviewed quite a bit of the code and still have about half the files to review. I've left some comments on what I've reviewed so far. Please let me know your thoughts.
@@ -41,6 +41,28 @@ export const editChannelSubscription = (body) => { | |||
}; | |||
}; | |||
|
|||
export function getConnected() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird to put this in this file but there's no "general" actions file so I suppose this makes sense. I wonder if we'll be adding other actions files in the future though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I create a new general file or is this fine?
ByURLPagID map[string]StringArrayMap | ||
ByURLSpaceKey map[string]StringArrayMap | ||
ByURLPageID map[string]StringStringArrayMap | ||
ByURLSpaceKey map[string]StringStringArrayMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed data type here too. Is this backwards compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mickmister no it is not but i am working on a feature to migrate the older subscriptions to the newer version of confluence
My main concern is saving the configuration for each Confluence server in the config. I'm thinking this should instead be in the KV store and be configured with slash commands or a new Flow, rather than adding a custom setting for the admin console. There are a lot of benefits to this, including being able to configure these things with the Mattermost mobile app. |
In case of the command.go file, it's better if you start changes and you move it so Git gets that it was the same file, I haven't checked the commits, but for some reason I think the file was deleted in a commit and then added in another, so we can't see the diff there. I have used a online diff tool to see better those changes. |
I don't understand well the difference between this PR and #88 . I think there is a very big commit in common, so I'd need to review the same code twice, which is a bit inefficient, Could this PR have the #88 as base so we don't have the same changes in both? Or how were these PRs split into two? Thank you! :-) |
@javaguirre PR 88 contains the code of this PR and 1 additional feature of creating a confluence page using mattermost. Actually, it was a concern of @mickmister that it would be better to break the PR 88 into 2 different PRs so I did exactly that. One of the broken-up PR is this PR 89 and I was not able to create the PR for the second feature due to the fact that 2nd feature also requires the code of this PR and I can't make incremental PRs on mattermost. Please ping freely in case of any query |
If you put PR #88 as a base for PR #89? To be honest, I don't think we can effectively review this PR nor the #88 , It's too long and we can't really test even a good percentage of the features. Next time would be nice having different PRs for different issues, having another PR as base different from I'd say we either accept this PR as is or close it, but I don't find a way of reviewing all these changes. I'll accept it, but next time I suggest creating smaller PRs that are related between them or trying to make independent changes thinking before about how to split the work. Thank you! |
…#1) (#6) * [MI-2252]:Added Config manipulation through slash commands * [MI-2252]:Fixed review fixes * [MI-2252]:Fixed review fixes * [MI-2252]:fixed review fixes * [MI-2252]:Fixed refresh token bug * [MI-2261]:Created delete sub command for confluence config (#2) * [MI-2261]:Created delete sub command for confluence config * [MI-2261]:Fixed lint errors * [MI-2261]:fixed review fixes * [MI-2261]:Fixed review fixes * [MI-2261]:Fixed review fixes * [MI-2267]:Wrote test cases for adding configs through slash commands (#3) * [MI-2267]:Wrote test cases for adding confligs through slash commands * [MI-2267]:Added default url for config modal * [MI-2267]:Fixed review fixes * [MI-2267]:Fixed review fixes * [MI-2267]:Fixed self review fixes * [MI-2267]:Fixed review fixes * [MI-2267]:fixed review fixes * [MI-2267]:fixed review fixes * [MI-2267]:Fixed review fixes * [MI-2280]:Add Dynamic Argument for config add command (#4) * [MI-2280]:Add Dynamic Argument for config add command * [MI-2280]:Fixed review fixes * [MI-2280]:Fixed CI error * [MI-2280]:Fixed CI errors * [MI-2280]:Fixed CI lint errors * [MI-2280]:Fixed test cases * [MI-2280]:fixed CI error * [MI-2280]:fixed review fixes
@mickmister Added the feature for config manipulation through slash commands and not using the custom component |
@mickmister Added feature to migrate old confluence subscriptions to this newer version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to block this and Michael has much more context, but now that I have time I'd like to discuss some changes/improvements that won't take much time.
Thank you!
* [MI-2362]:Fixed review fixes of confluence PR 89 on mattermost * [MI-2362]:Fixed review fixes
* [MI-2366]:Fixed review fixes of confluence PR 88 on mattermost * [MI-2366]:Fixed CI error * [MI-2366]:Fixed review fixes * [MI-2366]:Fixed review fixes
@javaguirre I Fixed review comments from PR 88 and 89 and I have pushed 2 separate commits for review comments for different branches. |
Thank you for the effort! I'll review it right away! 💯 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything else for now, but I'll review it again next week.
* bump version to 1.3.0 (mattermost-community#97) * [MI-2413]:Fixed review comments given by mm team * [MI-2413]:Fixed merge conflicts * [MI-2413]:Fixed lint errors * [MI-2413]:Fixed go critic error * [MI-2413]:Fixed manifest.go error * [MI-2413]:Fixed review fixes * [MI-2413]:Fixed review fixes * [MI-2413]:fixed build error Co-authored-by: Michael Kochell <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to block this more than necessary.
This PR needs special attention regarding QA, especially for backward compatibility issues, and support after releasing a new version of the plugin.
@javaguirre Sure let me know if you need anything |
* [MI-2449]:Fixed bugs found by QA * [MI-2449]:Fixed lint error * [MI-2449]:Fixed layout of autosuggest in commands * [MI-2449]:Fixed review fixes * [MI-2449]:Fixed test cases * [MI-2449]:Fixed lint errors * [MI-2449]:Added proper error * [MI-2449]:Fixed connect command error * [MI-2449]:Trim the url in the interactive dialogue * [MI-2449]:Fixed review fixes * [MI-2483]:Fixed the URL error in config modal (#17) * [MI-2483]:Fixed the URL error in config modal * [MI-2483]:Fixed review fixes * [MI-2483]:Fixed lint errors * [MI-2449]
@mickmister Do we need to add this PR & PR #88 in an upcoming release? |
@raghavaggarwal2308 Sounds good to me 👍 |
…luence into auth/notification
* Updated the readme * fixed review comments * Fixed lint errors
@mickmister Gentle reminder to re-review this PR |
…luence into auth/notification
@mickmister Gentle reminder to re-review |
Summary and Features Added:-
Removed the dependency on the Confluence-side plugin (OBR file) to support Confluence Server/Data Center subscriptions.
Added support for OAuth 2.0 for both Cloud and Server editions of Confluence. Users can OAuth using /Confluence connect command.
Remove the need to use a single shared authentication token limiting subscriptions to
admins only.
In the case of subscriptions, users can only subscribe to spaces and pages that their Confluence
account has access to, and the same for the events as well. Due to this, we had to change the way we were storing the subscription, and because of that the subscriptions were not backward compatible.
To tackle that we have added some commands to migrate the subscriptions and those commands can only be seen in the help command and auto-suggestion where there are some older subscriptions are present.
Support of the following events is there:-
• space_updated
• page_created
• page_restored
• page_trashed
• page_updated
• comment_created
• comment_updated
Added permissions for both Mattermost and confluence side which Mattermost Admin can change in Plugin configuration.