From 5fd70c971f87134fa1b82ede7d436359e77bc657 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 19 Feb 2026 13:08:06 -0800 Subject: [PATCH] Fix lint --- services/pull/comment_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/pull/comment_test.go b/services/pull/comment_test.go index a01fe3c524..580c1bb0b1 100644 --- a/services/pull/comment_test.go +++ b/services/pull/comment_test.go @@ -73,7 +73,7 @@ func TestCreatePushPullCommentForcePushDeletesOldComments(t *testing.T) { // typically return no commits, so only the force-push comment is expected. commits, err := gitRepo.CommitsBetweenNotBase(headCommit, oldCommit, pr.BaseBranch) assert.NoError(t, err) - assert.Len(t, commits, 0) + assert.Empty(t, commits) comments, err = issues_model.FindComments(t.Context(), &issues_model.FindCommentsOptions{ IssueID: pr.IssueID, @@ -150,7 +150,7 @@ func TestCreatePushPullCommentForcePushDeletesOldComments(t *testing.T) { assert.NoError(t, err) // For this scenario we expect at least one commit between head and base // that is not on the base branch, so data.CommitIDs should be non-empty. - assert.Greater(t, len(commits), 0) + assert.NotEmpty(t, commits) comments, err = issues_model.FindComments(t.Context(), &issues_model.FindCommentsOptions{ IssueID: pr.IssueID,