feat(incident): add `incident close` command
Description
- Add new
incident close
command to close/resolve incidents. - Replace integration test with tests using mocks (based on the following discussion).
Note: There are two commits in the MR. First commit moves issue close code into issuable directory. We need to avoid squashing commits on merge to keep the commit history for that file.
Related Issues
Resolves #1295 (closed)
How has this been tested?
- With extended integration test, but it requires some code changes to run locally. For example needs
GITLAB_TOKEN
andGITLAB_TEST_HOST
environment variables. - By running the following commands:
-
glab issue close ISSUE_ID
- to ensure existing command works as before -
glab issue close --help
- to ensure help is still displayed properly -
glab incident close --help
- to display help of the added command -
glab incident close INCIDENT_ID
- to close/resolve an incident -
glab incident close ISSUE_ID
- to see the error message. Cannot close issue with the new command
-
Screenshots:
incident --help | incident close --help | incident resolve --help | incident resolve ISSUE_ID | incident resolve INCIDENT_ID |
---|---|---|---|---|
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Vitali Tatarintev