Skip to content

gh issue view should include projectsV2 output #10708

@williammartin

Description

@williammartin

Describe the feature or problem you’d like to solve

Given I have an issue in a non-classic project (projectsV2)
When I run gh issue view (TTY or non TTY)
Then the projects section should mention the project

Additional context

See issue has projectItems which is projectsV2:

➜ gh issue view 24 --json projectItems | cat
{"projectItems":[{"status":{"optionId":"","name":""},"title":"@williammartin's untitled project"}]}

But it's not included in the standard view outputs (this example is non-TTY, but same for TTY)

➜  gh issue view 24 | cat
title:  Foobar
state:  OPEN
author: williammartin
labels:
comments:       0
assignees:
projects:
milestone:
number: 24
--

Comparatively, projectCards (classic project items) are included:

➜ gh issue view https://github.com/cli/cli/issues/575 --json projectCards | cat
{"projectCards":[{"project":{"name":"The GitHub CLI"},"column":{"name":"Backlog 🗒"}}]}
➜ gh issue view https://github.com/cli/cli/issues/575 | cat
title:  Detect push target for local branches without upstream configuration
state:  OPEN
author: mislav
labels: bug, gh-pr, p3
comments:       21
assignees:      williammartin, BagToad
projects:       The GitHub CLI (Backlog 🗒)

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIgh-issuerelating to the gh issue command

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions