Skip to content

Commit 1609f77

Browse files
author
Gusted
authored
Merge branch 'main' into fix-stack-context
2 parents 4feedee + 4ddae2c commit 1609f77

23 files changed

+29
-23
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ require (
104104
mvdan.cc/xurls/v2 v2.4.0
105105
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
106106
xorm.io/builder v0.3.11
107-
xorm.io/xorm v1.3.1
107+
xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f
108108
)
109109

110110
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,5 +2423,5 @@ strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:
24232423
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
24242424
xorm.io/builder v0.3.11 h1:naLkJitGyYW7ZZdncsh/JW+HF4HshmvTHTyUyPwJS00=
24252425
xorm.io/builder v0.3.11/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
2426-
xorm.io/xorm v1.3.1 h1:z5egKrDoOLqZFhMjcGF4FBHiTmE5/feQoHclfhNidfM=
2427-
xorm.io/xorm v1.3.1/go.mod h1:9NbjqdnjX6eyjRRhh01GHm64r6N9shTb/8Ak3YRt8Nw=
2426+
xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f h1:3NvNsM4lnttTsHpk8ODHqrwN1MCEjsO3bD/rpd8A47k=
2427+
xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f/go.mod h1:9NbjqdnjX6eyjRRhh01GHm64r6N9shTb/8Ak3YRt8Nw=

models/issues/issue_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (issues IssueList) loadAssignees(ctx context.Context) error {
242242
}
243243
rows, err := db.GetEngine(ctx).Table("issue_assignees").
244244
Join("INNER", "`user`", "`user`.id = `issue_assignees`.assignee_id").
245-
In("`issue_assignees`.issue_id", issueIDs[:limit]).
245+
In("`issue_assignees`.issue_id", issueIDs[:limit]).OrderBy(user_model.GetOrderByName()).
246246
Rows(new(AssigneeIssue))
247247
if err != nil {
248248
return err

models/organization/team_repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ func GetTeamsWithAccessToRepo(ctx context.Context, orgID, repoID int64, mode per
8181
Join("INNER", "team_repo", "team_repo.team_id = team.id").
8282
And("team_repo.org_id = ?", orgID).
8383
And("team_repo.repo_id = ?", repoID).
84+
OrderBy("name").
8485
Find(&teams)
8586
}

models/repo/user_repo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func GetRepoAssignees(ctx context.Context, repo *Repository) (_ []*user_model.Us
109109
// and just waste 1 unit is cheaper than re-allocate memory once.
110110
users := make([]*user_model.User, 0, len(userIDs)+1)
111111
if len(userIDs) > 0 {
112-
if err = e.In("id", userIDs).Find(&users); err != nil {
112+
if err = e.In("id", userIDs).OrderBy(user_model.GetOrderByName()).Find(&users); err != nil {
113113
return nil, err
114114
}
115115
}
@@ -168,5 +168,5 @@ func GetReviewers(ctx context.Context, repo *Repository, doerID, posterID int64)
168168
}
169169

170170
users := make([]*user_model.User, 0, 8)
171-
return users, db.GetEngine(ctx).Where(cond).OrderBy("name").Find(&users)
171+
return users, db.GetEngine(ctx).Where(cond).OrderBy(user_model.GetOrderByName()).Find(&users)
172172
}

models/user/user.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,3 +1314,10 @@ func IsUserVisibleToViewer(ctx context.Context, u, viewer *User) bool {
13141314
}
13151315
return false
13161316
}
1317+
1318+
func GetOrderByName() string {
1319+
if setting.UI.DefaultShowFullName {
1320+
return "full_name, name"
1321+
}
1322+
return "name"
1323+
}

options/locale/locale_cs-CZ.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,6 @@ pulls.remove_prefix=Odstranit prefix <strong>%s</strong>
14611461
pulls.data_broken=Tento požadavek na natažení je rozbitý kvůli chybějícím informacím o rozštěpení.
14621462
pulls.files_conflicted=Tento požadavek na natažení obsahuje změny, které kolidují s cílovou větví.
14631463
pulls.is_checking=Právě probíhá kontrola konfliktů při sloučení. Zkuste to za chvíli.
1464-
pulls.is_empty=Tato větev je stejná jako cílová větev.
14651464
pulls.required_status_check_failed=Některé požadované kontroly nebyly úspěšné.
14661465
pulls.required_status_check_missing=Některé požadované kontroly chybí.
14671466
pulls.required_status_check_administrator=Jako administrátor stále můžete sloučit tento požadavek na natažení.

options/locale/locale_de-DE.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,6 @@ pulls.remove_prefix=<strong>%s</strong> Präfix entfernen
15281528
pulls.data_broken=Dieser Pull-Requests ist kaputt, da Fork-Informationen gelöscht wurden.
15291529
pulls.files_conflicted=Dieser Pull-Request hat Änderungen, die im Widerspruch zum Ziel-Branch stehen.
15301530
pulls.is_checking=Die Konfliktprüfung läuft noch. Bitte aktualisiere die Seite in wenigen Augenblicken.
1531-
pulls.is_empty=Dieser Branch ist gleich mit dem Zielbranch.
15321531
pulls.required_status_check_failed=Einige erforderliche Prüfungen waren nicht erfolgreich.
15331532
pulls.required_status_check_missing=Einige erforderliche Prüfungen fehlen.
15341533
pulls.required_status_check_administrator=Als Administrator kannst du diesen Pull-Request weiterhin zusammenführen.

options/locale/locale_el-GR.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,6 @@ pulls.remove_prefix=Αφαίρεση <strong>%s</strong> προθέματος
15281528
pulls.data_broken=Αυτό το pull request είναι κατεστραμμένο λόγω των πληροφοριών του fork που λείπουν.
15291529
pulls.files_conflicted=Αυτό το pull request περιέχει αλλαγές που συγκρούονται με το κλάδο προορισμού.
15301530
pulls.is_checking=Ο έλεγχος συγκρούσεων κατά την συγχώνευση είναι σε εξέλιξη. Δοκιμάστε ξανά σε λίγα λεπτά.
1531-
pulls.is_empty=Αυτός ο κλάδος είναι ίσος με τον κλάδο-στόχο.
15321531
pulls.required_status_check_failed=Ορισμένοι απαιτούμενοι έλεγχοι δεν ήταν επιτυχείς.
15331532
pulls.required_status_check_missing=Λείπουν ορισμένοι απαιτούμενοι έλεγχοι.
15341533
pulls.required_status_check_administrator=Ως διαχειριστής, μπορείτε ακόμα να συγχωνεύσετε αυτό το pull request.

options/locale/locale_es-ES.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,6 @@ pulls.remove_prefix=Eliminar prefijo <strong>%s</strong>
15301530
pulls.data_broken=Este pull request está rota debido a que falta información del fork.
15311531
pulls.files_conflicted=Este pull request tiene cambios en conflicto con la rama de destino.
15321532
pulls.is_checking=La comprobación de conflicto de fusión está en progreso. Inténtalo de nuevo en unos momentos.
1533-
pulls.is_empty=Esta rama es igual a la rama objetivo.
15341533
pulls.required_status_check_failed=Algunos controles requeridos no han tenido éxito.
15351534
pulls.required_status_check_missing=Faltan algunos controles necesarios.
15361535
pulls.required_status_check_administrator=Como administrador, aún puede fusionar este Pull Request.

0 commit comments

Comments
 (0)