Fix discussion acceptance test flags by williammartin · Pull Request #14321 · cli/cli · GitHub
Skip to content

Fix discussion acceptance test flags - #14321

Merged
williammartin merged 1 commit into
trunkfrom
williammartin-fix-discussion-acceptance-tests
Sep 2, 2026
Merged

Fix discussion acceptance test flags#14321
williammartin merged 1 commit into
trunkfrom
williammartin-fix-discussion-acceptance-tests

Conversation

@williammartin

@williammartin williammartin commented Sep 2, 2026

Copy link
Copy Markdown
Member

Follow-up to #14215

Description

PR #14215 made --comments and --json mutually exclusive for discussion views, but four discussion acceptance-test commands still passed both flags. Remove --comments from those JSON assertions because requesting the comments JSON field already fetches the full comment data.

How did you test this change?

➜  williammartin-psychic-doodle git:(williammartin-psychic-doodle) GH_ACCEPTANCE_HOST=github.com \
GH_ACCEPTANCE_ORG=gh-acceptance-testing \
GH_ACCEPTANCE_TOKEN="$(gh auth token --hostname github.com)" \
go test -tags=acceptance ./acceptance -run '^TestDiscussions$'
ok      github.com/cli/cli/v2/acceptance        56.809s

Key points

The standalone --comments acceptance case remains unchanged so human-readable comment output is still covered.

Notes for reviewers

Start with acceptance/testdata/discussion/discussion-comment.txtar. PR #14215 introduced the mutual exclusion that exposed these stale commands.

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:

  • @williammartin 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>

Copilot-Session: 3950afa6-8c3e-4ae0-9654-ec5d9d64fcb6
Copilot AI balanced review requested due to automatic review settings September 2, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused test updates match the command validation and preserve the intended coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Updates discussion acceptance tests to comply with the mutually exclusive --comments and --json flags.

Changes:

  • Removes --comments from four JSON assertions.
  • Preserves standalone human-readable comment coverage.
File Description
acceptance/​testdata/​discussion/​discussion-list.txtar Fixes JSON comment-ID lookup flags.
acceptance/​testdata/​discussion/​discussion-comment.txtar Fixes JSON comment verification flags.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@williammartin
williammartin marked this pull request as ready for review September 2, 2026 13:20
@williammartin
williammartin requested a review from a team as a code owner September 2, 2026 13:20
@williammartin
williammartin merged commit 0da5ee8 into trunk Sep 2, 2026
38 checks passed
@williammartin
williammartin deleted the williammartin-fix-discussion-acceptance-tests branch September 2, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants