{
  "slug": "gh-discussion-commands-cover-repository-discussion-workflows-a5bf9df7b224",
  "title": "gh discussion commands cover repository discussion workflows",
  "tools": [
    "gh"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-10T22:22:07.000Z",
  "announced_at": "2026-06-10T22:22:07.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a repository has GitHub Discussions enabled, use GitHub CLI v2.94.0 or later to list, view, create, edit, and comment on discussions with `gh discussion` commands.",
    "examples": [
      "gh discussion list --repo <owner>/<repo>\ngh discussion view <number> --repo <owner>/<repo> --comments\ngh discussion create --repo <owner>/<repo> --title \"<title>\" --category \"<category>\" --body \"<body>\"\ngh discussion edit <number> --repo <owner>/<repo> --title \"<new-title>\" --body \"<new-body>\"\ngh discussion comment <number> --repo <owner>/<repo> --body \"<comment>\""
    ],
    "gotchas": [
      "Version: v2.94.0",
      "Requires Install or upgrade to GitHub CLI v2.94.0.",
      "<number> (required): Discussion number for view, edit, or comment; view also accepts a discussion URL.",
      "--repo <owner>/<repo>: Select a repository; otherwise the command uses the repository inferred from context.",
      "--comments: Fetch and display discussion comments with `view`.",
      "--title <title> (required): Discussion title when creating non-interactively; new title when editing.",
      "--category <name-or-slug> (required): Discussion category name or slug when creating non-interactively.",
      "--body <text> (required): Discussion body when creating non-interactively; replacement body when editing; comment text when commenting. `--body` and `--body-file` are mutually exclusive where both are supported.",
      "--body-file <file>: Read discussion or comment body from a file; `-` reads standard input. Mutually exclusive with `--body`.",
      "Authentication (required): Authenticate with `gh auth login` or provide `GH_TOKEN`/`GITHUB_TOKEN`; the docs do not specify discussion-specific scopes.",
      "Prerequisite: Install or upgrade to GitHub CLI v2.94.0 or later.",
      "Prerequisite: The target repository must have GitHub Discussions enabled.",
      "Prerequisite: Authenticate with GitHub CLI or set `GH_TOKEN`/`GITHUB_TOKEN`.",
      "Use on repositories where GitHub Discussions is enabled."
    ]
  },
  "why_it_matters": "When working in a repository with GitHub Discussions enabled, list, read, create, edit, or comment on discussions from the terminal.",
  "sources": [
    "https://github.blog/changelog/2026-06-10-list-view-and-create-discussions-in-github-cli",
    "https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/create/create.go",
    "https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/view/view.go",
    "https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/list/list.go",
    "https://raw.githubusercontent.com/cli/cli/v2.94.0/pkg/cmd/discussion/comment/comment.go",
    "https://cli.github.com/manual/index",
    "https://github.com/cli/cli/releases/tag/v2.94.0"
  ],
  "rank": 0.99054,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "recover-20261008",
    "verdict_id": "recover-20261008:recover-20261008-b01f68f99d0f8a24-0:gate",
    "evidence_hash": "8157338b061734471c70cbc76cc449c62b593c97d3d76d874125b234cb0a128e"
  },
  "review": {
    "draft_hash": "7f74375f8e5babc80444322f925d0c0adf14ec4ffafa56b43d8ff73729c82cd0",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "recover-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.99 >= 0.9; 2 needed) and Jev gave 0.73 (>= 0.6 needed)."
  }
}
