Skip to content

Commit 449ea60

Browse files
authored
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 <[email protected]>
1 parent d0a2c1e commit 449ea60

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

models/fixtures/repository.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@
618618
num_forks: 0
619619
num_issues: 1
620620
num_milestones: 1
621-
is_mirror: false
621+
is_mirror:
622+
is_archived: false
622623

623624
-
624625
id: 43

routers/web/user/home.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ func Milestones(ctx *context.Context) {
170170
Actor: ctxUser,
171171
OwnerID: ctxUser.ID,
172172
Private: true,
173-
AllPublic: false, // Include also all public repositories of users and public organisations
174-
AllLimited: false, // Include also all public repositories of limited organisations
173+
AllPublic: false, // Include also all public repositories of users and public organisations
174+
AllLimited: false, // Include also all public repositories of limited organisations
175+
Archived: util.OptionalBoolFalse,
175176
HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones
176177
}
177178

0 commit comments

Comments
 (0)