diff --git a/packages/cypress-cloud/lib/git.ts b/packages/cypress-cloud/lib/git.ts index fd7742d..5ce2858 100644 --- a/packages/cypress-cloud/lib/git.ts +++ b/packages/cypress-cloud/lib/git.ts @@ -14,8 +14,8 @@ export type GhaEventData = { senderHtmlUrl: string; }; -export const getGitInfo = async () => { - const commit = await commitInfo(); +export const getGitInfo = async (projectRoot: string) => { + const commit = await commitInfo(projectRoot); return getCommitDefaults({ branch: commit.branch, remoteOrigin: commit.remote, diff --git a/packages/cypress-cloud/lib/run.ts b/packages/cypress-cloud/lib/run.ts index 89f9dee..1610f16 100644 --- a/packages/cypress-cloud/lib/run.ts +++ b/packages/cypress-cloud/lib/run.ts @@ -96,7 +96,7 @@ export async function run(params: CurrentsRunParameters = {}) { const run = await createRun({ ci: getCI(ciBuildId), specs: specs.map((spec) => spec.relative), - commit: await getGitInfo(), + commit: await getGitInfo(config.projectRoot), group, platform, parallel: parallel ?? false,