diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-02-03 02:16:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-02 18:16:56 +0000 |
commit | 5dddcc1773b9245a7bcd1f71a83a0681ea541538 (patch) | |
tree | b676d2aa870c7b49db7d4f8f49a00e193ad0abd0 /models | |
parent | 34692a20b12e1d8fe094a474fb3a00d7f02a2b45 (diff) | |
download | gitea-5dddcc1773b9245a7bcd1f71a83a0681ea541538.tar.gz gitea-5dddcc1773b9245a7bcd1f71a83a0681ea541538.zip |
chore: fix some trivial problems and TODOs (#33473)
1. Fix incorrect `MentionCount` (actually it seems to be deadcode,
affects nothing)
2. Remove fallback sha1 support for time limit token
3. Use route middleware `reqRepoActionsWriter` for `ArtifactsDeleteView`
4. Use clearer message "Failed to authenticate user" instead of "Verify"
when auth fails
5. `tests/integration/benchmarks_test.go` is not quite right, actually
it is never used, so delete it.
6. Remove or update TODO comments
Diffstat (limited to 'models')
-rw-r--r-- | models/issues/issue_stats.go | 2 | ||||
-rw-r--r-- | models/system/notice_test.go | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/models/issues/issue_stats.go b/models/issues/issue_stats.go index 9ef9347a16..50409fbbd8 100644 --- a/models/issues/issue_stats.go +++ b/models/issues/issue_stats.go @@ -107,7 +107,7 @@ func GetIssueStats(ctx context.Context, opts *IssuesOptions) (*IssueStats, error accum.YourRepositoriesCount += stats.YourRepositoriesCount accum.AssignCount += stats.AssignCount accum.CreateCount += stats.CreateCount - accum.OpenCount += stats.MentionCount + accum.MentionCount += stats.MentionCount accum.ReviewRequestedCount += stats.ReviewRequestedCount accum.ReviewedCount += stats.ReviewedCount i = chunk diff --git a/models/system/notice_test.go b/models/system/notice_test.go index 599b2fb65c..9fc9e6cce1 100644 --- a/models/system/notice_test.go +++ b/models/system/notice_test.go @@ -45,8 +45,6 @@ func TestCreateRepositoryNotice(t *testing.T) { unittest.AssertExistsAndLoadBean(t, noticeBean) } -// TODO TestRemoveAllWithNotice - func TestCountNotices(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) assert.Equal(t, int64(3), system.CountNotices(db.DefaultContext)) |