refactor(issue/view): extract issuable/view package
Description
- Extract issue/incident view code into an issuable package
- Adjust tests to properly test both issue states
The code from issue_view.go
was moved into issuable_view.go
with almost no changes.
Tests from issue_view_test.go
were moved to issuable_view_test.go
and adopted to test both issue types: issue and incident.
To reduce the number of changes and make it easier to review, I've decided to split it into two parts:
- Extract
issue/incident view
command (This MR) - Extract
issue/incident list
command
Related Issues
Contributes to #1209 (closed)
How has this been tested?
- Run
make build
- Run
glab issue view 1
- Run
glab incident view 2
The last two commands should work as before
Screenshots (if appropriate):
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) -
Refactoring
Edited by Vitali Tatarintev