mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 07:57:23 +02:00
chore(scripts): tweak criteria for contributors
This commit is contained in:
5
.mailmap
5
.mailmap
@@ -17,8 +17,9 @@ Panagiotis Papadopoulos <pano_90@gmx.net> <102623907+pano9000@users.noreply.gith
|
||||
|
||||
Jon Fuller <jonfuller2012@gmail.com>
|
||||
|
||||
SiriusXT <11609255001@qq.com>
|
||||
SiriusXT <11609255001@qq.com> <37627919+SiriusXT@users.noreply.github.com>
|
||||
SiriusXT <1160925501@qq.com>
|
||||
SiriusXT <1160925501@qq.com> <11609255001@qq.com>
|
||||
SiriusXT <1160925501@qq.com> <37627919+SiriusXT@users.noreply.github.com>
|
||||
|
||||
JYC333 <22962980+JYC333@users.noreply.github.com>
|
||||
JYC333 <22962980+JYC333@users.noreply.github.com> <yuchuanjin333@gmail.com>
|
||||
|
||||
@@ -60,6 +60,13 @@ const TRANSLATION_PATHS = [
|
||||
"apps/server/src/assets/translations/"
|
||||
];
|
||||
|
||||
/** Authors that are bots or automated tools, not real contributors. */
|
||||
const EXCLUDED_AUTHORS = new Set([
|
||||
"Languages add-on",
|
||||
"Hosted Weblate",
|
||||
"renovate[bot]"
|
||||
]);
|
||||
|
||||
function parseShortlog(rawOutput: string): Map<string, { email: string; commitCount: number }> {
|
||||
const result = new Map<string, { email: string; commitCount: number }>();
|
||||
for (const line of rawOutput.split("\n")) {
|
||||
@@ -82,6 +89,7 @@ function listLocalGitContributors() {
|
||||
const translators: ContributorInfo[] = [];
|
||||
let rank = 0;
|
||||
for (const [name, { email, commitCount }] of allContribs) {
|
||||
if (EXCLUDED_AUTHORS.has(name)) continue;
|
||||
if (++rank > 20) break;
|
||||
|
||||
const translationCommitCount = translationContribs.get(name)?.commitCount ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user