fix: bug with diff output (#1201)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
161a189eb5
commit
3f7b5c900b
11
dist/index.js
generated
vendored
11
dist/index.js
generated
vendored
@ -404,6 +404,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
core.info('Completed fetching more history.');
|
||||||
}
|
}
|
||||||
const currentSha = yield getCurrentSHA({ inputs, workingDirectory });
|
const currentSha = yield getCurrentSHA({ inputs, workingDirectory });
|
||||||
let previousSha = inputs.baseSha;
|
let previousSha = inputs.baseSha;
|
||||||
@ -446,12 +447,12 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA;
|
previousSha = yield (0, utils_1.gitLsRemote)({
|
||||||
|
cwd: workingDirectory,
|
||||||
|
args: [targetBranch]
|
||||||
|
});
|
||||||
if (!previousSha) {
|
if (!previousSha) {
|
||||||
previousSha = yield (0, utils_1.gitLsRemote)({
|
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA;
|
||||||
cwd: workingDirectory,
|
|
||||||
args: [targetBranch]
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (isShallow) {
|
if (isShallow) {
|
||||||
if (yield (0, utils_1.canDiffCommits)({
|
if (yield (0, utils_1.canDiffCommits)({
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -312,6 +312,7 @@ export const getSHAForPullRequestEvent = async (
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
core.info('Completed fetching more history.')
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentSha = await getCurrentSHA({inputs, workingDirectory})
|
const currentSha = await getCurrentSHA({inputs, workingDirectory})
|
||||||
@ -369,13 +370,13 @@ export const getSHAForPullRequestEvent = async (
|
|||||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
previousSha = await gitLsRemote({
|
||||||
|
cwd: workingDirectory,
|
||||||
|
args: [targetBranch]
|
||||||
|
})
|
||||||
|
|
||||||
if (!previousSha) {
|
if (!previousSha) {
|
||||||
previousSha = await gitLsRemote({
|
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
cwd: workingDirectory,
|
|
||||||
args: [targetBranch]
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isShallow) {
|
if (isShallow) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user