feat(mr note create): add --file, --line, --old-line for diff comments
:robot: AI-generated ## Summary Add support for creating diff-line comments on merge requests via `glab mr note create`. This follows on from !3099 (create subcommand with discussions API) and !3155 (--reply flag and options struct refactor), which are both merged. ## Proposal Add the following flags to `glab mr note create`: - `--file <path>` — target file in the diff - `--line <N>` — line number on the new side of the diff - `--old-line <N>` — line number on the old side of the diff (for commenting on removed lines) These flags create a `position` object in the [Discussions API](https://docs.gitlab.com/api/discussions/#create-a-new-thread-in-the-merge-request-diff) to post notes on specific diff lines. ### Validation rules - `--file` is required when `--line` or `--old-line` is used - `--line` and `--old-line` are mutually exclusive - `--file`/`--line`/`--old-line` are mutually exclusive with `--reply` (diff comments create new threads) ### Implementation notes A POC already exists on the `tv/2026-03/mr-note-diff` branch. The approach: 1. Resolve `--file` path against the MR diff to find the correct base/head/start SHAs 2. Build the `position` object with `position_type: "text"` 3. Post via `POST /projects/:id/merge_requests/:iid/discussions` with the position body ## Related - Epic: https://gitlab.com/gitlab-org/cli/-/work_items/1311 - !3099 — `mr note create` subcommand (merged) - !3155 — `--reply` flag and options struct refactor (merged)
issue