From 58ffea2f833ae66666f5595f90db024a1c8f6d3a Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Sat, 4 Jun 2022 00:17:35 +0100 Subject: [PATCH 1/2] Exclude Archived repos from Dashboard Milestones Milestones in archived repos should not be displayed on `/milestones`. Therefore we should exclude these repositories from milestones page. Fix #18257 Signed-off-by: Andrew Thornton --- routers/web/user/home.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 2a802053fb094..ce1a1ff2d0521 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -169,8 +169,9 @@ func Milestones(ctx *context.Context) { Actor: ctxUser, OwnerID: ctxUser.ID, Private: true, - AllPublic: false, // Include also all public repositories of users and public organisations - AllLimited: false, // Include also all public repositories of limited organisations + AllPublic: false, // Include also all public repositories of users and public organisations + AllLimited: false, // Include also all public repositories of limited organisations + Archived: util.OptionalBoolFalse, HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones } From 9d2fff6d3d0e6eecb6632f6e5cc3716eb38c4f3c Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Sat, 4 Jun 2022 17:25:39 +0100 Subject: [PATCH 2/2] fix fixture Signed-off-by: Andrew Thornton --- models/fixtures/repository.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index 450c2f26af0fa..82b3ed16dcccf 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -618,7 +618,8 @@ num_forks: 0 num_issues: 1 num_milestones: 1 - is_mirror: false + is_mirror: + is_archived: false - id: 43