[Bug] Reply to diff note in MR throwing "line code" error
Description
Noticed on .com
in this MR note https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7966#note_1505497945
@mlunoe tried to post a reply but it kept erroring:
Your comment could not be submitted because line code can't be blank and line code must be a valid line code.
(July 2024): this can be reproduced by trying to reply to this comment: gitlab-pages!1016 (comment 2001848385)
Proposal
Do not validate line codes on replies to threads, since the line must exist for the parent comment to exist: #421630 (comment 2007491549)
Investigation
- Looks like this might be a relevant LOC https://gitlab.com/gitlab-org/gitlab/-/blob/11caec7b8dd8c706b3bc6a7fbdb3668866eaeb73/app/validators/line_code_validator.rb#L11
Edited by François Rosé