Skip to content

feat: Add `incident view` command

Vitali Tatarintev requested to merge ck3g-incident-view-command into main

Description

Adds incident view command, which in nutshell is similar to issue view. It opens opportunities to display incident-specific information.

Allows to open an incident by either issue URL (https://gitlab.com/OWNER/REPO/-/issues/ID) or incident URL (https://gitlab.com/OWNER/REPO/-/issues/incident/ID).

If a non-incident ID/URL is used in the incident view command, it responds with an error. incident view is intended to display incidents only, whereas issue view can display issues of any type: issues, incidents, etc.

Related Issues

Resolves #1189 (closed)

Contributes to &9586

How has this been tested?

With the following commands:

  • glab incident show <INCIDENT_ID>
  • glab incident show <INCIDENT_URL>
  • glab incident show <ISSUE_URL>
  • glab incident show <INCIDENT_ID> --comments
  • glab incident show <INCIDENT_ID> --web

Screenshots (if appropriate):

incident --help incident view --help view an incident Hidden text* Opening non-incident
Screenshot_2023-01-12_at_15.07.21 Screenshot_2023-01-12_at_15.08.02 Screenshot_2023-01-12_at_15.08.27 Screenshot_2023-01-12_at_17.11.21 Screenshot_2023-01-24_at_16.02.32

* Needs to be fixed in a follow-up

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)
Edited by Vitali Tatarintev

Merge request reports