feat: git add multiple files at once

This commit is contained in:
GitHub Actions
2021-10-26 09:41:22 +02:00
parent 5e0ef822fd
commit 4aef61f232
2 changed files with 11 additions and 5 deletions

View File

@@ -129,12 +129,10 @@ export async function pushNewFiles(files: File[] = []): Promise<any> {
await git.pull();
await Promise.all(
files.map(async ({ filename, data }) => {
await fsp.writeFile(filename, data);
await git.add(filename);
})
files.map(({ filename, data }) => fsp.writeFile(filename, data))
);
await git.add(files.map(({ filename }) => filename));
await git.commit(`chore(updates): updated entries in files`);
await git.push();
}