Skip to content

Commit

Permalink
Apply suggestions from legobbeat code review
Browse files Browse the repository at this point in the history
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
  • Loading branch information
HowardBraham and legobeat authored Oct 2, 2024
1 parent 7f0edcf commit 18502f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/scripts/git-diff-develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ async function getPrInfo(): Promise<PRInfo | null> {
*/
async function fetchWithDepth(depth: number): Promise<boolean> {
try {
await exec(`git fetch --depth ${depth} origin ${MAIN_BRANCH}`);
await exec(`git fetch --depth ${depth} origin "${MAIN_BRANCH}"`);
await exec(
`git fetch --depth ${depth} origin ${SOURCE_BRANCH}:${SOURCE_BRANCH}`,
`git fetch --depth ${depth} origin "${SOURCE_BRANCH}:${SOURCE_BRANCH}"`,
);
return true;
} catch (error: unknown) {
Expand Down Expand Up @@ -87,7 +87,7 @@ async function fetchUntilMergeBaseFound() {
}
}
}
await exec(`git fetch --unshallow origin ${MAIN_BRANCH}`);
await exec(`git fetch --unshallow origin "${MAIN_BRANCH}"`);
}

/**
Expand All @@ -100,7 +100,7 @@ async function fetchUntilMergeBaseFound() {
async function gitDiff(): Promise<string> {
await fetchUntilMergeBaseFound();
const { stdout: diffResult } = await exec(
`git diff --name-only origin/HEAD...${SOURCE_BRANCH}`,
`git diff --name-only "origin/HEAD...${SOURCE_BRANCH}"`,
);
if (!diffResult) {
throw new Error('Unable to get diff after full checkout.');
Expand Down

0 comments on commit 18502f9

Please sign in to comment.