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) {
|
if (inputs.sinceLastRemoteCommit) {
|
||||||
previousSha = env.GITHUB_EVENT_BEFORE;
|
previousSha = env.GITHUB_EVENT_BEFORE;
|
||||||
if (!previousSha) {
|
if (!previousSha) {
|
||||||
previousSha = yield (0, utils_1.getRemoteBranchHeadSha)({
|
previousSha = yield (0, utils_1.getParentSha)({ cwd: workingDirectory });
|
||||||
cwd: workingDirectory,
|
|
||||||
branch: currentBranch
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if ((yield (0, utils_1.verifyCommitSha)({
|
if (!previousSha) {
|
||||||
sha: previousSha,
|
|
||||||
cwd: workingDirectory,
|
|
||||||
showAsErrorMessage: false
|
|
||||||
})) !== 0) {
|
|
||||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA;
|
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;
|
exports.getHeadSha = getHeadSha;
|
||||||
const getRemoteBranchHeadSha = ({ cwd, branch }) => __awaiter(void 0, void 0, void 0, function* () {
|
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,
|
cwd,
|
||||||
silent: process.env.RUNNER_DEBUG !== '1'
|
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
|
previousSha = env.GITHUB_EVENT_BEFORE
|
||||||
|
|
||||||
if (!previousSha) {
|
if (!previousSha) {
|
||||||
previousSha = await getRemoteBranchHeadSha({
|
previousSha = await getParentSha({cwd: workingDirectory})
|
||||||
cwd: workingDirectory,
|
|
||||||
branch: currentBranch
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!previousSha) {
|
||||||
(await verifyCommitSha({
|
|
||||||
sha: previousSha,
|
|
||||||
cwd: workingDirectory,
|
|
||||||
showAsErrorMessage: false
|
|
||||||
})) !== 0
|
|
||||||
) {
|
|
||||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ export const getRemoteBranchHeadSha = async ({
|
|||||||
}): Promise<string> => {
|
}): Promise<string> => {
|
||||||
const {stdout} = await exec.getExecOutput(
|
const {stdout} = await exec.getExecOutput(
|
||||||
'git',
|
'git',
|
||||||
['rev-parse', `refs/remotes/origin/${branch}`],
|
['rev-parse', `origin/${branch}`],
|
||||||
{
|
{
|
||||||
cwd,
|
cwd,
|
||||||
silent: process.env.RUNNER_DEBUG !== '1'
|
silent: process.env.RUNNER_DEBUG !== '1'
|
||||||
|
|||||||
Reference in New Issue
Block a user