From 074714d61f0729a0fb049daa71f04a84ffd6df19 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 16:53:49 +0000 Subject: [PATCH] Fix lint and MySQL test failures: remove unused function and fix UUID column type Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com> --- internal/database/attachment.go | 2 +- internal/database/issue.go | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/database/attachment.go b/internal/database/attachment.go index 19b16126b..716d6e9c2 100644 --- a/internal/database/attachment.go +++ b/internal/database/attachment.go @@ -19,7 +19,7 @@ import ( // Attachment represent a attachment of issue/comment/release. type Attachment struct { ID int64 - UUID string `gorm:"column:uuid;uniqueIndex"` + UUID string `gorm:"column:uuid;type:varchar(191);uniqueIndex"` IssueID int64 `gorm:"index"` CommentID int64 ReleaseID int64 `gorm:"index"` diff --git a/internal/database/issue.go b/internal/database/issue.go index 737877b4b..6c8c43ce1 100644 --- a/internal/database/issue.go +++ b/internal/database/issue.go @@ -1201,16 +1201,6 @@ const ( FilterModeMention FilterMode = "mentioned" ) -func parseCountResult(results []map[string][]byte) int64 { - if len(results) == 0 { - return 0 - } - for _, result := range results[0] { - return com.StrTo(string(result)).MustInt64() - } - return 0 -} - type IssueStatsOptions struct { RepoID int64 UserID int64