Upgrade Mattermost integration to use API v4
The code for the Mattermost integration for GitLab (located here) is using Mattermost API v3 which is going to be deprecated in Mattermost 4.6, coming out in a couple weeks. It will still be enabled by default until Mattermost 4.7, but after that, it will start disabled on new Mattermost servers. In Mattermost 5.0 (release date to be determined), it will be removed entirely.
The API calls made by GitLab should be changed over to use API v4 which has been fully supported since Mattermost 4.0. Most API v3 routes have direct counterparts in API v4, so it should just be a matter of changing the routes and their arguments.
There's more information about the deprecation and upgrade process here. The full schedule for deprecation is:
- In Mattermost 4.6 (mid-January), Mattermost will print a warning message in the logs for Mattermost servers with API v3 enabled that it has now been deprecated.
- In Mattermost 4.7 (mid-February), Mattermost will ship with API v3 turned off by default for any new servers. A banner will be displayed within Mattermost for System Admin users.
- In Mattermost 5.0 (TBD), API v3 will be removed entirely.
Update API v3 will be removed on June 16, 2018, per https://gitlab.com/gitlab-org/gitlab-ce/issues/41631#note_73353374.