Skip to content

refactor(issue/view): extract issuable/view package

Vitali Tatarintev requested to merge 1209-extract-issuable-view-package into main

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?

  1. Run make build
  2. Run glab issue view 1
  3. 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

Merge request reports