refactor: track unchanged lines between new and old version of the diff
This MR creates an algorithm that parses diff hunks. This algorithm is used to:
- Get all lines that have been added on the new version of the diff. This is used to show commenting ranges (i.e. tell the user on which lines they can comment)
-
Track both line number in the old diff and line number in the new diff for each unchanged line. GitLab API requires both of these numbers to be submitted with a request to create a new diff thread. The function
getUnchangedLines
is the one contribution of this MR.
Related to #344 (closed)
Edited by Tomas Vik (OOO back on 2024-11-19)