Loading
feat(environments): add StopStaleEnvironments to Environments
What
Adds EnvironmentsService.StopStaleEnvironments for POST /projects/:id/environments/stop_stale.
StopStaleEnvironmentsOptions.Before(*time.Time) is required by GitLab and must be between 10 years and 1 week ago. The client does not validate this, GitLab returns a 400.- Returns
StopStaleEnvironmentsResult{Message}so callers can read GitLab's confirmation message. testing/environments_mock.goregenerated.
Tests
TestStopStaleEnvironments covers the request body, the result, an invalid ID type, a request option error and a 400 response.
Related
Closes #2316 (closed)
GitLab API docs: https://docs.gitlab.com/api/environments/#stop-stale-environments