chore: Internally sort list of contributors by user id to simplify git history

This commit is contained in:
Artem Chepurnoy 2024-12-22 12:22:58 +02:00
parent ab90d0d622
commit 118ee773b6
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
3 changed files with 1252 additions and 1226 deletions

View File

@ -57,6 +57,7 @@ report_data = report["data"]
# amount of contributed words.
report_data = list(filter(
lambda x: x["translated"] + x["approved"] >= MIN_WORDS_CONTRIBUTED, report_data))
report_data.sort(key=lambda x: x["user"]["id"])
report_data_text = json.dumps(report_data, indent=2)

View File

@ -79,6 +79,9 @@ class LocalizationContributorsServiceImpl(
.effectMap { jsonString ->
val entities = json.decodeFromString<List<LocalizationContributorEntity>>(jsonString)
val models = entities.map(LocalizationContributorEntity::toDomain)
.sortedByDescending { contributor ->
contributor.translated
}
models
}
.sharedSoftRef(TAG)