Skip to content

Add missing fields to LinePositionOptions

What does this MR do and why?

Add missing fields to LinePositionOptions

Gitlab API supports these options and they are necessary for correctly setting line ranges on discussions with client-go requests.

References

Addresses this issue.

When creating a merge request discussion, client-go only allows specifying the LineCode and Type for a comment position. When these LinePositionOptions are used in gitlab.nvim (a Neovim plugin for managing Gitlab reviews) to create a comment, the line range of the comment is not correctly shown in Gitlab, leading to this issue in gitlab.nvim/Gitlab.

The Gitlab API in contrast supports specifying old_line and new_line in the line range position data which are necessary to show line ranges in Gitlab.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading