Add mattermost integration resource
#607 Add mattermost integration.
It's a copy and paste and adapt of the gitlab_integration_slack
files.
I used the order in the api documentation https://docs.gitlab.com/ee/api/integrations.html#createedit-mattermost-notifications-integration
curl --request PUT \
--url https://gitlab.staging.mycompany.io/api/v4/projects/42/integrations/mattermost \
--header 'Content-Type: multipart/form-data' \
--header 'PRIVATE-TOKEN: myapiapireadsudotoken' \
--header 'Sudo: root' \
--form channel=mytestchannel \
--form webhook=https://mattermost.mycompany.com/hooks/secrethooktoken
produces
{
"id": 1,
"title": "Mattermost notifications",
"slug": "mattermost",
"created_at": "2023-08-29T10:58:24.413Z",
"updated_at": "2023-08-29T11:19:10.734Z",
"active": true,
"commit_events": true,
"push_events": true,
"issues_events": true,
"incident_events": false,
"confidential_issues_events": true,
"merge_requests_events": true,
"tag_push_events": true,
"note_events": true,
"confidential_note_events": true,
"pipeline_events": true,
"wiki_page_events": true,
"job_events": true,
"comment_on_event_enabled": true,
"properties": {
"username": null,
"notify_only_broken_pipelines": null,
"branches_to_be_notified": null,
"labels_to_be_notified": null,
"labels_to_be_notified_behavior": null,
"push_channel": null,
"issue_channel": null,
"confidential_issue_channel": null,
"merge_request_channel": null,
"note_channel": null,
"confidential_note_channel": null,
"tag_push_channel": null,
"pipeline_channel": null,
"wiki_page_channel": null,
"deployment_channel": null,
"incident_channel": null
}
}
which leads me to the conclusion that the channel
property does not exist on GitLab side, even though it is implemented by go-gitlab and mentioned in the GitLab api documentation here https://docs.gitlab.com/ee/api/integrations.html#createedit-mattermost-notifications-integration.
confidential_note_channel
and note_channel
seem to be treated as the same property.
Edited by Elisabeth Kulzer