mirror of
https://github.com/godotengine/godot-team-reports.git
synced 2025-12-31 13:48:17 +03:00
Improve team and reviewer sorting
This commit is contained in:
@@ -228,9 +228,12 @@ export default class PullRequestItem extends LitElement {
|
||||
|
||||
const other_teams = [].concat(this.teams);
|
||||
other_teams.sort((a, b) => {
|
||||
if (a > b) return 1;
|
||||
if (a < b) return -1;
|
||||
return 0;
|
||||
const a_name = a.toLowerCase().replace(/^_/, "");
|
||||
const b_name = b.toLowerCase().replace(/^_/, "");
|
||||
|
||||
if (a_name > b_name) return 1;
|
||||
if (a_name < b_name) return -1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
const authorClassList = [ "pr-author-value" ];
|
||||
|
||||
@@ -73,15 +73,21 @@ export default class EntryComponent extends LitElement {
|
||||
if (a.id === -1) return -1;
|
||||
if (b.id === -1) return -1;
|
||||
|
||||
if (a.name > b.name) return 1;
|
||||
if (a.name < b.name) return -1;
|
||||
const a_name = a.name.toLowerCase().replace(/^_/, "");
|
||||
const b_name = b.name.toLowerCase().replace(/^_/, "");
|
||||
|
||||
if (a_name > b_name) return 1;
|
||||
if (a_name < b_name) return -1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
this._orderedReviewers = Object.values(this._reviewers);
|
||||
this._orderedReviewers.sort((a, b) => {
|
||||
if (a.name > b.name) return 1;
|
||||
if (a.name < b.name) return -1;
|
||||
const a_name = a.name.toLowerCase();
|
||||
const b_name = b.name.toLowerCase();
|
||||
|
||||
if (a_name > b_name) return 1;
|
||||
if (a_name < b_name) return -1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user