Skip to content

ability to add MR comment for specific file and line

Problem to solve

Maybe it's already possible with glab, but I really searched through the documentation and the issues, multiple times, and I just couldn't find it. What I'd like would be to be able to enter a comment for a merge request, for a specific file and line of code. So not a comment on the general merge request, but for a specific line of code that was touched by the MR.

I would plug in this my editor for fast editing, as the browser is really slow when reviewing large merge requests and review is quite painful. That way I could review from my text editor and get a much more snappy user experience.

Proposal

I would expand glab mr note to add flags --file and --line to say where to attach the note to. Although --line probably should also allow a line range line start:end.

Further details

For instance, this is such a note in this repo: !1127 (comment 1207698223)

It's tied to a specific file and line number in the diff of the MR.

Links / references

https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/mr/note.md

Same feature request for the github cli: https://github.com/cli/cli/issues/359

I apologize again if it's already implemented, but I really couldn't find it...

Edited by Emmanuel Touzery
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information