Enforce minimum server version comment in `plugin/api.go`.

Description

In plugin/api.go, we document the minimum required server version to use an API, e.g.:

1 2 3 4 // UpdateUserActive deactivates or reactivates an user. // // Minimum server version: 5.8 UpdateUserActive(userId string, active bool) *model.AppError

This means that the API was first added to Mattermost 5.8, and simply won't be available in earlier versions.

Let's add a build-check that ensures this comment is present and well formatted as the last comment prior to all methods on the API interface. Methods without an explicit comment are implicitly supported in Mattermost 5.2 and later and should be updated as part of this ticket to be explicit. Once this issue is resolved, new API methods without a well-formed minimum server version comment should fail the build.

Use Go reflection to solve this problem. Do not rely on grep.

QA Test Steps

None

Status

Mana

None

Assignee

Mattermost Community

Reporter

Jesse Hallam

Epic Link

None

Fix versions

Mattermost Team

Toolkit

Sprint

None

Labels

None