Fix git config order in pipeline

This commit is contained in:
root
2026-03-12 12:17:23 +00:00
parent 8b6e6275a6
commit 8383262426

View File

@@ -37,10 +37,11 @@ async function createGiteaRepo(name: string) {
async function gitInitAndPush(repoDir: string, repoUrl: string, token: string) {
const config = loadConfig();
await run('git', ['init', '-b', 'main'], repoDir);
if (config.git?.userName) await run('git', ['config', 'user.name', config.git.userName], repoDir);
if (config.git?.userEmail) await run('git', ['config', 'user.email', config.git.userEmail], repoDir);
await run('git', ['init', '-b', 'main'], repoDir);
await run('git', ['add', '.'], repoDir);
await run('git', ['commit', '-m', 'Initial generated MCP server'], repoDir);