feat: set created_by as the default filter for /issues and /pulls (#5286)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5286
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
Shiny Nematoda 2024-09-13 12:55:39 +00:00 committed by 0ko
commit 14abf65269
4 changed files with 27 additions and 8 deletions

View file

@ -407,8 +407,6 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
switch viewType {
case "assigned":
filterMode = issues_model.FilterModeAssign
case "created_by":
filterMode = issues_model.FilterModeCreate
case "mentioned":
filterMode = issues_model.FilterModeMention
case "review_requested":
@ -416,10 +414,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
case "reviewed_by":
filterMode = issues_model.FilterModeReviewed
case "your_repositories":
filterMode = issues_model.FilterModeYourRepositories
case "created_by":
fallthrough
default:
filterMode = issues_model.FilterModeYourRepositories
viewType = "your_repositories"
filterMode = issues_model.FilterModeCreate
viewType = "created_by"
}
// --------------------------------------------------------------------------