diff --git a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts index 5b4c9d4a01..c169e43a66 100644 --- a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts +++ b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts @@ -276,7 +276,7 @@ describe('ExpandedPreviewer', () => { expect(mockedSpawnProcess).toHaveBeenNthCalledWith( 2, 'git', - ['add', '.'], + ['config', 'user.email', '"cli@coveo.com"'], { cwd: previewPath, stdio: 'ignore', @@ -285,7 +285,25 @@ describe('ExpandedPreviewer', () => { expect(mockedSpawnProcess).toHaveBeenNthCalledWith( 3, 'git', - ['commit', '--message=someorg currently'], + ['config', 'user.name', '"Coveo CLI"'], + { + cwd: previewPath, + stdio: 'ignore', + } + ); + expect(mockedSpawnProcess).toHaveBeenNthCalledWith( + 4, + 'git', + ['add', '.'], + { + cwd: previewPath, + stdio: 'ignore', + } + ); + expect(mockedSpawnProcess).toHaveBeenNthCalledWith( + 5, + 'git', + ['commit', '--message="someorg currently"'], { cwd: previewPath, stdio: 'ignore', diff --git a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts index ca18bcbacf..5f77e36420 100644 --- a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts +++ b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts @@ -106,6 +106,14 @@ export class ExpandedPreviewer { private async initialPreviewCommit(dirPath: string) { await spawnProcess('git', ['init'], {cwd: dirPath, stdio: 'ignore'}); + await spawnProcess('git', ['config', 'user.email', 'cli@coveo.com'], { + cwd: dirPath, + stdio: 'ignore', + }); + await spawnProcess('git', ['config', 'user.name', 'Coveo CLI'], { + cwd: dirPath, + stdio: 'ignore', + }); await spawnProcess('git', ['add', '.'], {cwd: dirPath, stdio: 'ignore'}); await spawnProcess('git', ['commit', `--message=${this.orgId} currently`], { cwd: dirPath,