refactor: update commitAndPush function to accept repoDir parameter and adjust related tests
This commit is contained in:
+1
-3
@@ -47,12 +47,10 @@ export function cloneRepo(workspace, _spawnSync = spawnSync) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function commitAndPush(workspace, _spawnSync = spawnSync) {
|
||||
export async function commitAndPush(workspace, repoDir, _spawnSync = spawnSync) {
|
||||
const run = makeRunner(_spawnSync);
|
||||
|
||||
try {
|
||||
const repoDir = cloneRepo(workspace, _spawnSync);
|
||||
|
||||
await withAskpass(workspace, async credEnv => {
|
||||
run(['config', 'user.email', 'ai-review[bot]@gitea'], repoDir);
|
||||
run(['config', 'user.name', 'AI Review Bot'], repoDir);
|
||||
|
||||
Reference in New Issue
Block a user