{
  "slug": "glab-attach-uploads-and-references-local-files-53c7bd76b0d7",
  "title": "glab attach uploads and references local files",
  "tools": [
    "glab"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-08T12:22:28.543Z",
  "announced_at": "2026-09-08T12:22:28.543Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating or updating a GitLab work item, issue, or merge request with a local file to include, pass the file path with `--attach` to upload it and add its reference to the description.",
    "examples": [
      "glab work-items create --type issue --title \"<title>\" --attach <local-file>",
      "glab mr create -t \"<title>\" --attach <local-file>",
      "glab mr update <id> --attach <local-file>"
    ],
    "gotchas": [
      "Version: v1.117.0",
      "--attach <file>: Upload a file and reference it at the end of the description. Repeat the flag for multiple files, or pass `-` to read from standard input.",
      "--group: Select a group or subgroup for work item creation. The work-items docs say it cannot be combined with `--attach`.",
      "--type <type> (required): Work item type; documented values include epic, incident, issue, key_result, objective, requirement, task, test_case, and ticket.",
      "--title <title>: Set the work item title.",
      "-t, --title <title>: Set the merge request title.",
      "<id | branch>: Select the merge request to update; defaults to the currently checked-out branch.",
      "Prerequisite: Authenticate `glab` with the GitLab instance; the docs direct users to run `glab auth login`.",
      "Prerequisite: The `--attach` feature is experimental and might be unstable or removed."
    ]
  },
  "why_it_matters": "When attaching a local file in a GitLab workflow, upload and reference it with `--attach`.",
  "sources": [
    "https://gitlab.com/gitlab-org/cli/-/releases/v1.117.0",
    "https://docs.gitlab.com/cli/work-items/create/",
    "https://docs.gitlab.com/cli/mr/create/",
    "https://docs.gitlab.com/cli/mr/update/",
    "https://docs.gitlab.com/cli/"
  ],
  "rank": 0.90026,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-69c8edb5e2baf6e3-0:gate",
    "evidence_hash": "27f608dd8fb0dba1bbf68a29aa74ac9f9b11b22d44e95b0719a4752595e57d5f"
  },
  "review": {
    "draft_hash": "cf98ce0b9aef80aa7171e00cbb95a27f6ff9cb180a5c5e8dd67101c077d019a6",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.90 >= 0.9; 2 needed) and Jev gave 0.75 (>= 0.6 needed)."
  }
}
