Skip to content

Commit 10320c1

Browse files
GuillaumeLagrangeldelossa
authored andcommitted
feat: use base sha from pr data in file diff
1 parent bd25740 commit 10320c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/litee/gh/pr/diff_view.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ function M.open_diffsplit(commit, file, thread, compare_base)
433433
-- write the old version of the file to /tmp/ and diff it
434434
local parent_commit = nil
435435
if compare_base then
436-
parent_commit = s.pull_state.commits[1]["parents"][1]["sha"]
436+
parent_commit = s.pull_state.pr_raw.base.sha
437437
else
438438
parent_commit = commit["parents"][1]["sha"]
439439
end

0 commit comments

Comments
 (0)