Mattermost-server: [Help Wanted] [MM-12373] Create CLI command "webhook modify-outgoing"

Created on 16 Oct 2018  路  10Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.


Notes: Jira ticket

Mattermost is improving its CLI interface and we're looking for contributors to help with that effort. This Help Wanted issue is to implement webhook modify-outgoing command in the CLI.

Allow modifying outgoing webhooks.

Example: webhook modify-outgoing w16zb5tu3n1zkqo18goqry1je --title MyCommand --description "My Command Description" --channel mychannel --trigger-words "word1\nword2" --triger-in first --icon http://localhost:8000/my-slash-handler-bot-icon.png --url http://localhost:8000/my-webhook-handler --content-type "application/json"

Before you start, make sure you read this short Documentation

If you need other examples you can see the PR mattermost/mattermost-server#9094

Easy Hackfest TecGo

All 10 comments

Hello @esethna, I would love to work on this.

Thank you @wgfm! Please let us know any questions.

Just wanted to let you know that I didn't disappear, and I'm working on this.

Quick question - what fields of the OutgoingWebhook are the trigger-in (has typo in ticket), url and title mapped to?

There's a CallbackURLs array, which might map to url somehow, and perhaps title maps to DisplayName.

Hi, I'd like to work on this.

Great @migbot, thanks! You might want to look into the closed PR from @wgfm. Let us know if you have any questions.

@hanzei OK, I've started working on this and have a couple of questions:

  1. createIncomingWebhookCmdF throws an error if the channel is not found. Should createOutgoingWebhookCmdF do the same?

  2. The channel argument must be in the format teamName:channelName. Should either A) the help text for the arg be updated to explicitly state that or B) should the channel arg just take the channel name and functions can compose the teamName:channelName string since we can access the team in both createOutgoingWebhookCmdF and the new modifyOutgoingWebhookCmdF?

Just to clarify: This ticket is about a webhook modify-outgoing command. It should be implemented similar to webhook modify-incoming. You might want to take a look at https://github.com/mattermost/mattermost-server/blob/master/cmd/mattermost/commands/webhook.go#L157-L205

  1. No. There is no need to touch this method.
  2. Similar to webhook modify-incoming the argument should be in the format teamName:channelName. The help text can just be Channel ID like with webhook modify-incoming.

@hanzei Got it. OK I've created a PR.

Was this page helpful?
0 / 5 - 0 ratings