chore: update authors list (#44694)

* chore: update authors list

* chore: fix

* Update scripts/generate-authors.ts

Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: lijianan <574980606@qq.com>

* chore: fix

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
lijianan
2023-09-07 20:55:34 +08:00
committed by GitHub
parent 3b6b840555
commit 5183e5d64a
3 changed files with 1622 additions and 1595 deletions

File diff suppressed because it is too large Load Diff

1611
contributors.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -17,8 +17,8 @@ const excludes = [
];
async function execute() {
let logs = (await git.log()).all;
logs = _.remove(logs, ({ author_email: email }) => {
let { all } = await git.log();
all = _.remove(all, ({ author_email: email }) => {
for (let i = 0; i < excludes.length; i++) {
const item = excludes[i];
if (email.includes(item)) {
@@ -27,10 +27,16 @@ async function execute() {
}
return true;
});
logs = _.sortBy(_.unionBy(logs, 'author_email'), 'author_name');
all = _.sortBy(_.unionBy(all, 'author_email'), 'author_name');
fs.writeFileSync(
path.join(cwd, 'AUTHORS.txt'),
Array.from(new Set(logs.map((item) => item.author_name))).join('\n'),
path.join(cwd, 'contributors.json'),
JSON.stringify(
Array.from(new Set<string>(all.map((authorItem) => authorItem.author_name))),
null,
2,
),
);
}