feat(mr note create): add --reply flag and refactor to options struct
Follow-up to !3099 (merged).
What
-
Refactor
glab mr note createto follow the project's Commands convention: move CLI state into an unexportedcreateOptionsstruct with aniofield from the factory, and split the cobraRunEintocomplete/validate/runmethods.Addresses review feedback from !3099 (merged)#note_3240051394.
-
Add
--replyflag toglab mr note createfor replying to an existing discussion thread. The value is a full discussion ID or a unique prefix of at least 8 characters, resolved viamrutils.ResolveDiscussionID.--replyand--uniqueare mutually exclusive:--uniquescans top-level discussion notes for duplicates, which doesn't make sense when targeting a specific thread.
Usage
# Reply by full discussion ID
glab mr note create 123 --reply abc12345deadbeef1234567890abcdef12345678 -m "I agree!"
# Reply by prefix (8+ chars)
glab mr note create 123 --reply abc12345 -m "thanks"Commits
refactor(mr note create): use options struct with complete/validate/runfeat(mr note create): add --reply flag
Related
- Epic: ability to add MR comment for specific file and line
- Previous MR: !3099 (merged)
Manual testing
# Build from branch
git checkout tv/2026-04/mr-note-reply && make build
# Post a reply to an existing discussion (use 8+ char prefix of the discussion ID)
./bin/glab mr note create 3155 --reply 0c56c3d2 -m "test reply" -R gitlab-org/cli