Browse Source

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>
tags/v1.18.0-dev
zeripath 2 years ago
parent
commit
449ea6005f
No account linked to committer's email address
2 changed files with 5 additions and 3 deletions
  1. 2
    1
      models/fixtures/repository.yml
  2. 3
    2
      routers/web/user/home.go

+ 2
- 1
models/fixtures/repository.yml View File

@@ -618,7 +618,8 @@
num_forks: 0
num_issues: 1
num_milestones: 1
is_mirror: false
is_mirror:
is_archived: false

-
id: 43

+ 3
- 2
routers/web/user/home.go View File

@@ -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
}


Loading…
Cancel
Save