Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ecc6e7fe2 | ||
|
|
72cf8893fc | ||
|
|
28d6f2964c | ||
|
|
8c9ee56d01 |
11864
HISTORY.md
11864
HISTORY.md
File diff suppressed because it is too large
Load Diff
13
dist/index.js
generated
vendored
13
dist/index.js
generated
vendored
@@ -436,16 +436,9 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
previousSha = env.GITHUB_EVENT_BEFORE;
|
||||
if (!previousSha) {
|
||||
previousSha = yield (0, utils_1.getRemoteBranchHeadSha)({
|
||||
cwd: workingDirectory,
|
||||
branch: currentBranch
|
||||
});
|
||||
previousSha = yield (0, utils_1.getParentSha)({ cwd: workingDirectory });
|
||||
}
|
||||
if ((yield (0, utils_1.verifyCommitSha)({
|
||||
sha: previousSha,
|
||||
cwd: workingDirectory,
|
||||
showAsErrorMessage: false
|
||||
})) !== 0) {
|
||||
if (!previousSha) {
|
||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA;
|
||||
}
|
||||
}
|
||||
@@ -1524,7 +1517,7 @@ const getHeadSha = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
});
|
||||
exports.getHeadSha = getHeadSha;
|
||||
const getRemoteBranchHeadSha = ({ cwd, branch }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { stdout } = yield exec.getExecOutput('git', ['rev-parse', `refs/remotes/origin/${branch}`], {
|
||||
const { stdout } = yield exec.getExecOutput('git', ['rev-parse', `origin/${branch}`], {
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
});
|
||||
|
||||
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
@@ -360,19 +360,10 @@ export const getSHAForPullRequestEvent = async (
|
||||
previousSha = env.GITHUB_EVENT_BEFORE
|
||||
|
||||
if (!previousSha) {
|
||||
previousSha = await getRemoteBranchHeadSha({
|
||||
cwd: workingDirectory,
|
||||
branch: currentBranch
|
||||
})
|
||||
previousSha = await getParentSha({cwd: workingDirectory})
|
||||
}
|
||||
|
||||
if (
|
||||
(await verifyCommitSha({
|
||||
sha: previousSha,
|
||||
cwd: workingDirectory,
|
||||
showAsErrorMessage: false
|
||||
})) !== 0
|
||||
) {
|
||||
if (!previousSha) {
|
||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -510,7 +510,7 @@ export const getRemoteBranchHeadSha = async ({
|
||||
}): Promise<string> => {
|
||||
const {stdout} = await exec.getExecOutput(
|
||||
'git',
|
||||
['rev-parse', `refs/remotes/origin/${branch}`],
|
||||
['rev-parse', `origin/${branch}`],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
|
||||
Reference in New Issue
Block a user