-
Notifications
You must be signed in to change notification settings - Fork 15
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-57] add autocomplete #62
Conversation
Does not include implemented http endpoint for subscription name autocomplete
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
=======================================
Coverage 29.48% 29.48%
=======================================
Files 8 8
Lines 234 234
=======================================
Hits 69 69
Misses 153 153
Partials 12 12 Continue to review full report at Codecov.
|
} | ||
|
||
func handleGetChannelSubscriptions(w http.ResponseWriter, r *http.Request) { | ||
channelID := r.FormValue("channel_id") |
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.
@iomodo, I'm not sure of the exact commit needed from master, but I believe this is the functionality that is not currently in a released 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'm out of the loop here. Can you please explain?
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.
There was a change to autocomplete that now passes the channel_id
to the URL as a query param. This was only recently introduced. Without this new feature, you have no way of detecting the current channel for which you are typing an autocomplete command.
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.
True, changes are for 5.26 so you can grab the lates master for now.
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.
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.
Yes, we needed to update the min server version. I committed the min_server_version
to 5.26.0
.
What is the correct action with respect to merging? I added the Do Not Merge/Awaiting PR
label. We can merge post 5.26.0
release. How does that sound and is that necessary?
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.
- updated
min_server_version
tov5.26.0
in plugin.json - updated go.mod with latest server version commit via
go get github.com/mattermost/mattermost-server/v5@93a537a636299e1e049505bdaf072f8d3ae974a4
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.
LGTM, just a few non-blocking nits
} | ||
|
||
func handleGetChannelSubscriptions(w http.ResponseWriter, r *http.Request) { | ||
channelID := r.FormValue("channel_id") |
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'm out of the loop here. Can you please explain?
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.
LGTM!
feature which allows getting the current channel_id
@@ -5,7 +5,7 @@ go 1.13 | |||
require ( | |||
bou.ke/monkey v1.0.2 | |||
github.com/gorilla/mux v1.7.4 | |||
github.com/mattermost/mattermost-server/v5 v5.24.1 | |||
github.com/mattermost/mattermost-server/v5 v5.3.2-0.20200717105608-93a537a63629 |
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.
What changes in mattermost-server
that are only in master
are needed for this PR?
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.
getting the channel_id
in the dynamic argument endpoint would be the one.
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.
Got it 👍
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.
Tested and passed
- Slash command auto complete works as expected
- Tested that all commands have been included
- Briefly smoke tested the functionality
no issues found
LGTM!
Summary
This PR adds autocomplete to the confluence plugin.
A new endpoint is added to handle the dynamic retrieving of subscription aliases for the
edit
andunsubscribe
commands.Ticket Link
Fixes #57