Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ecc6e7fe2 | ||
|
|
72cf8893fc | ||
|
|
28d6f2964c | ||
|
|
8c9ee56d01 |
18
HISTORY.md
18
HISTORY.md
@@ -1,5 +1,23 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [36.0.13](https://github.com/tj-actions/changed-files/compare/v36.0.12...v36.0.13) - (2023-06-01)
|
||||||
|
|
||||||
|
## <!-- 1 -->🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Error fetching history ([#1211](https://github.com/tj-actions/changed-files/issues/1211)) ([8c9ee56](https://github.com/tj-actions/changed-files/commit/8c9ee56d0180a538ad5b6b8a208e4db974bad9c0)) - (Tonye Jack)
|
||||||
|
|
||||||
|
# [36.0.12](https://github.com/tj-actions/changed-files/compare/v36.0.11...v36.0.12) - (2023-06-01)
|
||||||
|
|
||||||
|
## <!-- 1 -->🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Bug retrieving diff when persist credentials is false ([#1209](https://github.com/tj-actions/changed-files/issues/1209)) ([5978e5a](https://github.com/tj-actions/changed-files/commit/5978e5a2df95ef20cde627d4acb5edd1f87ba46a)) - (Tonye Jack)
|
||||||
|
|
||||||
|
## <!-- 9 -->⬆️ Upgrades
|
||||||
|
|
||||||
|
- Upgraded to v36.0.11 ([#1208](https://github.com/tj-actions/changed-files/issues/1208))
|
||||||
|
|
||||||
|
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([ab45871](https://github.com/tj-actions/changed-files/commit/ab45871481bbe65bf9de161fdb13c95410d9b930)) - (tj-actions[bot])
|
||||||
|
|
||||||
# [36.0.11](https://github.com/tj-actions/changed-files/compare/v36.0.10...v36.0.11) - (2023-05-31)
|
# [36.0.11](https://github.com/tj-actions/changed-files/compare/v36.0.10...v36.0.11) - (2023-05-31)
|
||||||
|
|
||||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||||
|
|||||||
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