Skip to content

Commit 3f7b5c9

Browse files
fix: bug with diff output (#1201)
Co-authored-by: GitHub Action <[email protected]>
1 parent 161a189 commit 3f7b5c9

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

dist/index.js

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commitSha.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ export const getSHAForPullRequestEvent = async (
312312
})
313313
}
314314
}
315+
core.info('Completed fetching more history.')
315316
}
316317

317318
const currentSha = await getCurrentSHA({inputs, workingDirectory})
@@ -369,13 +370,13 @@ export const getSHAForPullRequestEvent = async (
369370
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
370371
}
371372
} else {
372-
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
373+
previousSha = await gitLsRemote({
374+
cwd: workingDirectory,
375+
args: [targetBranch]
376+
})
373377

374378
if (!previousSha) {
375-
previousSha = await gitLsRemote({
376-
cwd: workingDirectory,
377-
args: [targetBranch]
378-
})
379+
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
379380
}
380381

381382
if (isShallow) {

0 commit comments

Comments
 (0)