.nh .TH "glab" "1" "Sep 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-mr-note-create - Create a comment or discussion on a merge request. (EXPERIMENTAL) .SH SYNOPSIS \fBglab mr note create [ | ] [flags]\fP .SH DESCRIPTION Add a comment to a merge request. By default, the command creates the comment as a new discussion thread. .PP Use \fB--resolvable=false\fR to create a non-resolvable note instead. Non-resolvable notes do not block merging when the project requires \fBAll threads must be resolved\fP\&. Use this option for automation or status updates that do not need a human to resolve them. .PP Use \fB--reply\fR to add a note to an existing discussion thread instead of starting a new one. The value can be a full discussion ID or a unique prefix of at least 8 characters. Find discussion IDs with \fBglab mr note list\fR\&. Human-readable output uses eight characters before the ellipsis, for example \fB[discussion: abc12345…]\fR; pass only those characters, for example \fB--reply abc12345\fR\&. To get a full ID, use the \fBid\fR field of each discussion object: \fBglab mr note list -F json | jq -r '.[].id'\fR\&. .PP Use \fB--file\fR to place a diff comment on a specific file in the latest merge request diff version. Combine with \fB--line\fR (new side) or \fB--old-line\fR (old/removed side) to target a specific line. Omit both flags for a file-level comment. .PP The flag rules are: .IP \(bu 2 \fB--line\fR and \fB--old-line\fR require \fB--file\fR, and cannot be used together. .IP \(bu 2 \fB--file\fR, \fB--reply\fR, and \fB--unique\fR are mutually exclusive. .IP \(bu 2 \fB--resolvable=false\fR cannot be combined with \fB--reply\fR or \fB--file\fR (and by extension \fB--line\fR or \fB--old-line\fR). .PP This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/. .SH OPTIONS \fB--file\fP="" File path for a diff comment, like \&. Targets the latest merge request diff version. .PP \fB--line\fP="" Line in the new version. A single line number, like 42, or a range, like 10:15. .PP \fB-m\fP, \fB--message\fP="" Comment or note message. .PP \fB--old-line\fP=0 Line in the old version, for commenting on a removed line. .PP \fB--reply\fP="" Reply to an existing discussion. Accepts a full discussion ID or a unique prefix of at least 8 characters. .PP \fB--resolvable\fP[=true] Create the note as a resolvable discussion thread. Set to false to create a non-resolvable note. .PP \fB--unique\fP[=false] Don't create a note if a note with the same body already exists. Reads all merge request comments first. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. .SH EXAMPLE .EX # Add a comment to merge request 123 glab mr note create 123 -m "Looks good to me!" # Add a comment to the current branch's merge request glab mr note create -m "LGTM" # Open editor to compose the message glab mr note create 123 # Pipe from stdin echo "LGTM" | glab mr note create 123 # Read the body from a file glab mr note create 123 < plan.md # Skip if already posted glab mr note create 123 -m "LGTM" --unique # Create a non-resolvable note, for example for bot or CI status updates glab mr note create 123 -m "Build status: green" --resolvable=false # Reply to an existing discussion thread glab mr note create 123 --reply abc12345 -m "I agree!" # Add a diff comment on line 42 of main.go glab mr note create 123 --file main.go --line 42 -m "Needs refactoring" # Add a diff comment on lines 10-15 (multiline range) glab mr note create 123 --file main.go --line 10:15 -m "Extract this block" # Add a diff comment on a removed line (old side) glab mr note create 123 --file main.go --old-line 7 -m "Why was this removed?" # Add a file-level diff comment (no line specified) glab mr note create 123 --file main.go -m "General comment on this file" .EE .SH SEE ALSO \fBglab-mr-note(1)\fP