mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +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:
parent
1a269f7ef8
commit
78438d310b
5 changed files with 109 additions and 177 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue