summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-06-04 19:30:01 +0100
committerGitHub <noreply@github.com>2022-06-04 19:30:01 +0100
commit449ea6005fb613212102126ff267f5c16f7c40b8 (patch)
tree0168970d73ad6bb3bafda9bacb70939fc114deff
parentd0a2c1e82bf7d6505c268bc106d2ff57be6eb7d7 (diff)
downloadgitea-449ea6005fb613212102126ff267f5c16f7c40b8.tar.gz
gitea-449ea6005fb613212102126ff267f5c16f7c40b8.zip
Exclude Archived repos from Dashboard Milestones (#19882)
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 <art27@cantab.net>
-rw-r--r--models/fixtures/repository.yml3
-rw-r--r--routers/web/user/home.go5
2 files changed, 5 insertions, 3 deletions
diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml
index 450c2f26af..82b3ed16dc 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
diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index 455761d039..297d76d4aa 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -170,8 +170,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
}