{
  "slug": "gh-issue-pr-and-comment-commands-attach-media-with-attach-ab2c523691d4",
  "title": "gh issue, pr, and comment commands attach media with --attach",
  "tools": [
    "gh"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-01T20:25:04.000Z",
  "announced_at": "2026-09-01T20:25:04.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating or editing an issue or pull request, or adding a comment, use repeatable `--attach <file>` to upload local images or videos and add them to the body. Include optional image alt text after `#`; an existing body reference to the file is rewritten to the uploaded asset URL, otherwise the attachment is appended.",
    "examples": [
      "gh issue create --attach './repro.png#The error state'",
      "gh issue edit <issue-number> --attach ./walkthrough.mp4",
      "gh pr comment <number|url|branch> --attach ./result.mp4"
    ],
    "gotchas": [
      "Version: v2.99.0",
      "Availability: Attachments are available on GitHub.com and GitHub Enterprise Cloud.",
      "--attach <file>: Image or video file to attach, optionally as `<file>#<image alt text>`; repeat the flag for multiple files. Up to 50 files per command.",
      "issue number or URL (required): Selects the issue to edit or comment on.",
      "number, URL, or branch: Selects the pull request to comment on; without one, the current branch's pull request is used.",
      "<file>#<image alt text>: Optional image alt text follows `#`; without it, the filename is used. Video has no alt text.",
      "Prerequisite: Attachments are supported on GitHub.com and GitHub Enterprise Cloud, per the v2.99.0 release note.",
      "Prerequisite: The local file must be an attachable image or video; the command documentation limits attachments to images and videos.",
      "The repeatable `--attach` flag uploads local images and videos."
    ]
  },
  "why_it_matters": "Attach local images or videos while creating or editing an issue or pull request, or adding a comment.",
  "sources": [
    "https://github.com/cli/cli/releases/tag/v2.99.0",
    "https://cli.github.com/manual/gh_issue_create",
    "https://cli.github.com/manual/gh_issue_edit",
    "https://cli.github.com/manual/gh_pr_comment"
  ],
  "rank": 0.9905,
  "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": "augsep-20261008",
    "verdict_id": "augsep-20261008:augsep-20261008-a821704c77daab11-0:gate",
    "evidence_hash": "c1fe278bc210fd10305c583743fcb8685ae4e49d3fe0d0bf107f01fefefc79c2"
  },
  "review": {
    "draft_hash": "ea7c6214a345f917bcb2e47ab716867db35b8b939df89724e8270a1d1340b334",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "augsep-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.77 (>= 0.6 needed)."
  }
}
