Skip to content

Add acceptance tests for discussion list#13151

Closed
maxbeizer wants to merge 2 commits into
cli:feature/discussionfrom
maxbeizer:discussion-acceptance-tests
Closed

Add acceptance tests for discussion list#13151
maxbeizer wants to merge 2 commits into
cli:feature/discussionfrom
maxbeizer:discussion-acceptance-tests

Conversation

@maxbeizer

Copy link
Copy Markdown
Contributor

Summary

Adds read-only acceptance tests for gh discussion list, targeting cli/cli as a known public repo with discussions enabled.

Tests

Verifies:

  • TTY output with #<number> format
  • Non-TTY output includes STATE column
  • JSON envelope fields (totalCount, discussions, next cursor)
  • Closed state filtering (--state closed)
  • Category filtering (--category general)
  • Sort and order flags (--sort created --order asc)

Approach

These are read-only smoke tests — no repo creation or cleanup needed. They catch GQL schema mismatches (like the state vs closed bug we hit) without requiring test org infrastructure.

When discussion create lands, we can add full CRUD tests using GH_ACCEPTANCE_ORG.

Stacked on #13084.

@maxbeizer maxbeizer requested a review from a team as a code owner April 13, 2026 20:50
@maxbeizer maxbeizer requested review from babakks and removed request for a team April 13, 2026 20:50
@github-actions github-actions Bot added unmet-requirements external pull request originating outside of the CLI core team labels Apr 13, 2026
@github-actions

Copy link
Copy Markdown

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

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. 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 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

@github-actions github-actions Bot added the needs-triage needs to be reviewed label Apr 13, 2026
@maxbeizer maxbeizer force-pushed the discussion-acceptance-tests branch from 1e6752d to 1088758 Compare April 13, 2026 22:15
@maxbeizer maxbeizer marked this pull request as draft April 13, 2026 22:16
@maxbeizer

Copy link
Copy Markdown
Contributor Author

Converting to draft — this depends on #13084 (discussion list) landing in feature/discussion first. The acceptance tests call gh discussion list which doesn't exist on the base branch yet. Will mark ready for review once #13084 is merged.

Read-only smoke tests against cli/cli that verify:
- TTY and non-TTY table output
- JSON envelope (totalCount, discussions, next cursor)
- Closed state filtering
- Category filtering
- Sort and order flags

These are lightweight read-only tests that catch GQL schema
mismatches without requiring test org infrastructure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maxbeizer maxbeizer force-pushed the discussion-acceptance-tests branch from 1088758 to 5056405 Compare April 16, 2026 21:48
- Fix non-TTY smoke test pattern: non-TTY output uses bare numbers
  without '#' prefix, so use '\d+\tOPEN' instead of '#\d+'
- Add computed 'state' field to discussionListFields so --json state
  works in acceptance tests (ExportData already supports it)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maxbeizer maxbeizer marked this pull request as ready for review April 16, 2026 22:20
@github-actions github-actions Bot removed the needs-triage needs to be reviewed label Apr 21, 2026
@github-actions github-actions Bot closed this Apr 21, 2026
@babakks babakks reopened this Apr 29, 2026
@github-actions

Copy link
Copy Markdown

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 7 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)

@github-actions github-actions Bot added the needs-triage needs to be reviewed label Apr 29, 2026
@babakks

babakks commented Apr 29, 2026

Copy link
Copy Markdown
Member

Reopened as it was closed by automation.

@github-actions github-actions Bot removed the needs-triage needs to be reviewed label May 4, 2026
@github-actions github-actions Bot closed this May 4, 2026
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 unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants