Skip to content

Fix project item-add output for non-TTY - #14056

Open
zwick wants to merge 1 commit into
cli:trunkfrom
zwick:zwick-fix-project-item-add-output
Open

Fix project item-add output for non-TTY#14056
zwick wants to merge 1 commit into
cli:trunkfrom
zwick:zwick-fix-project-item-add-output

Conversation

@zwick

@zwick zwick commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #14055

Description

gh project item-add emitted no output when stdout was not a TTY. It now prints the created ProjectV2 item ID, while preserving Added item for TTY output and existing --format output.

How did you test this change?

go test ./pkg/cmd/project/item-add -run 'Test(PrintResults|RunAddItem_JSON)$'

Result: ok github.com/cli/cli/v2/pkg/cmd/project/item-add

Key points

The existing mutation result supplies the item ID, so this adds no API requests.

Notes for reviewers

The change is limited to output selection and focused regression coverage.

Authorship and follow-up

Who wrote this:

  • A human wrote it.
  • An agent wrote it under close human direction.
  • An agent wrote it independently, and no human has guided the implementation beyond the initial prompt.

Who answers review comments:

  • @zwick will read and reply directly.
  • An agent will draft replies and @username will read them before they are posted.
  • Nobody has explicitly committed to replying.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Aug 3, 2026
@zwick
zwick marked this pull request as ready for review August 3, 2026 18:52
@zwick
zwick requested a review from a team as a code owner August 3, 2026 18:52
@zwick
zwick requested review from Copilot and tidy-dev and removed request for Copilot August 3, 2026 18:52
@github-actions github-actions Bot added unmet-requirements and removed needs-triage needs to be reviewed labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for your pull request! Unfortunately, it doesn't meet the requirements for review:

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. This PR will be automatically closed in 4 days if these requirements are not met.

Full contribution requirements
  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh project item-add suppresses success output when stdout is not a TTY

2 participants