Unable to provide stateReason to --json flag of issue view #8782
Labels
enhancement
a request to improve CLI
gh-issue
relating to the gh issue command
help wanted
Contributions welcome
Describe the bug
The
state_reason
issue attribute cannot be provided to the--json
parameter of theissue
view
command.The
state_reason
Issue attribute is referenced in numerous files (not complete list):cli/pkg/cmd/issue/view/view.go
Line 81 in 9dd102f
cli/api/queries_issue.go
Line 30 in 9dd102f
cli/pkg/search/result.go
Line 238 in 9dd102f
It was also discussed in this Issue:
All discussion makes it appear that
stateReason
is a supported field. However, it is not defined in theAvailable fields
listed when providing an invalid--json
value.Steps to reproduce the behavior
$ gh issue view -R owner/repo/73 --json closed,closedAt,state,stateReason
Expected vs actual behavior
Expected:
state_reason
Issue
field should able to be returned by specifyingstateReason
within the--json
flagActual: error stating
stateReason
is not an available field.Logs
The text was updated successfully, but these errors were encountered: