Skip to content

Commit

Permalink
Exclude Archived repos from Dashboard Milestones (go-gitea#19882)
Browse files Browse the repository at this point in the history
Milestones in archived repos should not be displayed on `/milestones`. Therefore
we should exclude these repositories from milestones page.

Fix go-gitea#18257

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent c8ffb13 commit 78b1a0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion models/fixtures/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@
num_forks: 0
num_issues: 1
num_milestones: 1
is_mirror: false
is_mirror:
is_archived: false

-
id: 43
Expand Down
5 changes: 3 additions & 2 deletions routers/web/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 78b1a0d

Please sign in to comment.