You need incoming webhook URL in http://<mattermost_server>/hooks/<web_hook_id>
format. Can be copied from Mattermost config.
Mattermost Config
- Go to
...
menu System console
Integrations
→Custom Integrations
- Enable Settings
Enable Incoming Webhooks
:true
Enable integrations to override usernames
:true
Enable integrations to override profile picture icons
:true
Create Incoming Webhook
- Go to
...
menu Integrations
→Incoming Webhooks
Add Incoming Webhook
- JIRA Administration → System
- ADVANCED → WebHooks
- Create a WebHook:
- URL: https://yourserver?mattermost_hook_url=_mattermost_hook_url&channel=channel_name
- Issue:
- created: true
- updated: true
- deleted: true
go build
./mattermost-jira -addr=127.0.0.1 -port=5002 -log=./test.log
Addr defaults to 0.0.0.0
Port defaults to 5000
Log defaults to ./mattermost-jira.log
While server is running in background or different session, execute:
Simple Test:
curl -X POST -H "Content-Type: application/json" --data @sample_hook.json "localhost:5000?mattermost_hook_url=http://localhost:8065/hooks/67qhmgccxffaunr886gfewoqfo&channel=off-topic"
Simple Repeated Test:
while sleep 0.2
do
(curl -X POST -H "Content-Type: application/json" --data @sample_hook.json "localhost:5000?mattermost_hook_url=http://localhost:8065/hooks/67qhmgccxffaunr886gfewoqfo&channel=town-square") &
done
curl -X POST -H "Content-Type: application/json" --data @sample_hook.json "jira-uchat-integration.corp.uber.internal?mattermost_hook_url=http://uchat-sandbox.corp.uber.internal/hooks/9kbfs1yooprsujd3ckadw4z66a&channel=super-test")