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>
tokarchuk/v1.17
zeripath 3 years ago committed by GitHub
parent d0a2c1e82b
commit 449ea6005f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      models/fixtures/repository.yml
  2. 5
      routers/web/user/home.go

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

@ -170,8 +170,9 @@ func Milestones(ctx *context.Context) {
Actor: ctxUser, Actor: ctxUser,
OwnerID: ctxUser.ID, OwnerID: ctxUser.ID,
Private: true, Private: true,
AllPublic: false, // Include also all public repositories of users and public organisations AllPublic: false, // Include also all public repositories of users and public organisations
AllLimited: false, // Include also all public repositories of limited organisations AllLimited: false, // Include also all public repositories of limited organisations
Archived: util.OptionalBoolFalse,
HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones
} }

Loading…
Cancel
Save