fix: jump to reviewer from comment pane - #587
Open
Sackbuoy wants to merge 1 commit into
Open
Conversation
Collaborator
|
Hi Cameron, thanks for the contribution. Before merging, I'd like to debug this a little more. You say
You can press range = {
["end"] = {
line_code = "626a747c8694eaae66f2afb3d1a745b045782c70_0_8",
new_line = 8,
old_line = 0,
type = "new"
},
start = {
line_code = "626a747c8694eaae66f2afb3d1a745b045782c70_0_8",
new_line = 8,
old_line = 0,
type = "new"
}
},Maybe the actual bug lies somewhere else - the line code may not be correctly created. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
when calculating the line range in the lua function
get_line_numbers_for_rangein./lua/gitlab/actions/common.lua, there is no nil guard for new_end_line or new_start_line, so a single line comment seems to cause it to fail. This change is intended to guard against nil for those values and allow therangeof the comment to be 0 if one of those values is found to be nilExpected Behavior:
When performing a code review with the comments/discussions pane focused, hitting the
Jump to comment location in filekeybind(oby default) should focus the file and line pertaining to the comment in the diff hunk pane.Current Behavior:
Confirmed behavior on both v4.1.1, and the latest
developbranch - Jumping to comment location in file produces the following error:Build/Environment info:
Lua and Go tests still pass, linters came back clean - fix confirmed working when applied both to the
developbranch and tov4.1.1This is my first contribution, so let me know if anything else is needed - happy to discuss whatever questions come up