mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Add option to filter board cards by labels and assignees (#31999)
Works in both organization and repository project boards Fixes #21846 Replaces #21963 Replaces #27117  **Note** that implementation was made intentionally to work same as in issue list so that URL can be bookmarked for quick access with predefined filters in URL
This commit is contained in:
@@ -5,25 +5,11 @@ package repo
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"sort"
|
||||
|
||||
"code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
)
|
||||
|
||||
func MakeSelfOnTop(doer *user.User, users []*user.User) []*user.User {
|
||||
if doer != nil {
|
||||
sort.Slice(users, func(i, j int) bool {
|
||||
if users[i].ID == users[j].ID {
|
||||
return false
|
||||
}
|
||||
return users[i].ID == doer.ID // if users[i] is self, put it before others, so less=true
|
||||
})
|
||||
}
|
||||
return users
|
||||
}
|
||||
|
||||
func HandleGitError(ctx *context.Context, msg string, err error) {
|
||||
if git.IsErrNotExist(err) {
|
||||
refType := ""
|
||||
|
Reference in New Issue
Block a user