mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Fix issues/pr list broken when there are many repositories (#8409)
* fix issues/pr list broken when there are many repositories * remove unused codes * fix counting error on issues/prs * keep the old logic * fix panic * fix tests
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
func TestIssue_ReplaceLabels(t *testing.T) {
|
||||
@@ -266,10 +267,12 @@ func TestGetUserIssueStats(t *testing.T) {
|
||||
},
|
||||
{
|
||||
UserIssueStatsOptions{
|
||||
UserID: 2,
|
||||
UserRepoIDs: []int64{1, 2},
|
||||
FilterMode: FilterModeAll,
|
||||
IsClosed: true,
|
||||
UserID: 2,
|
||||
RepoSubQuery: builder.Select("repository.id").
|
||||
From("repository").
|
||||
Where(builder.In("repository.id", []int64{1, 2})),
|
||||
FilterMode: FilterModeAll,
|
||||
IsClosed: true,
|
||||
},
|
||||
IssueStats{
|
||||
YourRepositoriesCount: 2,
|
||||
|
Reference in New Issue
Block a user