This commit is contained in:
Lunny Xiao 2025-07-21 17:02:39 -07:00
parent cbd73a59cc
commit 1556911468
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 1 additions and 11 deletions

View File

@ -385,7 +385,7 @@ func GetAffectedHunksForTwoCommitsSpecialFile(ctx context.Context, repoPath, old
}
// Parse the hunk header
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString(lof)
hunks = append([]*HunkInfo{}, &HunkInfo{
hunks = append(hunks, &HunkInfo{
LeftLine: int64(leftLine),
LeftHunk: int64(leftHunk),
RightLine: int64(rightLine),

View File

@ -445,16 +445,6 @@ func Test_ReviewCodeComment(t *testing.T) {
})
assert.NoError(t, err)
diffContent, _, err := git.NewCommand("diff").AddDynamicArguments(pr.MergeBase, pr.GetGitHeadRefName()).RunStdString(
t.Context(), &git.RunOpts{
Dir: repo.RepoPath(),
},
)
assert.NoError(t, err)
fmt.Println("=======")
fmt.Println(diffContent)
fmt.Println("=======")
session := loginUser(t, "user2")
comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{
Type: issues_model.CommentTypeCode,