From e41b19f6603beaff78c66dfbf5147a39e49a333b Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 1 May 2023 20:00:04 -0400 Subject: [PATCH] Fix git username --- web/src/routes/admin/contests/create/+page.server.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/routes/admin/contests/create/+page.server.ts b/web/src/routes/admin/contests/create/+page.server.ts index b8460e3..c8c453d 100644 --- a/web/src/routes/admin/contests/create/+page.server.ts +++ b/web/src/routes/admin/contests/create/+page.server.ts @@ -72,8 +72,6 @@ export const actions = { createdContest.teams.forEach(async (team) => { fs.mkdirSync(join('temp', team.id.toString())); const git = simpleGit({ baseDir: join('temp', team.id.toString()) }); - await git.addConfig('user.name', "Admin"); - await git.addConfig('user.email', "noemail@example.com"); await git.init(); await git.checkoutLocalBranch('master'); createdContest.problems.forEach((problem) => { @@ -83,7 +81,7 @@ export const actions = { ); }); await git.add('.'); - await git.commit('Initial'); + await git.commit('Initial', { '--author': 'Admin <>' }); await git.push( 'http://localhost:7006/' + createdContest.id.toString() + '/' + team.id.toString(), 'master'