feat: add support for skipping initial fetch (#1353)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack
2023-07-09 03:19:14 -06:00
committed by GitHub
parent 00b3d3d9e7
commit 2f49eb9ee1
6 changed files with 89 additions and 59 deletions

View File

@@ -92,7 +92,7 @@ export const getSHAForPushEvent = async (
const currentBranch = targetBranch
let initialCommit = false
if (isShallow) {
if (isShallow && !inputs.skipInitialFetch) {
core.info('Repository is shallow, fetching more history...')
if (isTag) {
@@ -271,7 +271,7 @@ export const getSHAForPullRequestEvent = async (
targetBranch = currentBranch
}
if (isShallow) {
if (isShallow && !inputs.skipInitialFetch) {
core.info('Repository is shallow, fetching more history...')
let prFetchExitCode = await gitFetch({