Revert change
This commit is contained in:
parent
efe3e32d02
commit
71c896b78e
10
dist/index.js
generated
vendored
10
dist/index.js
generated
vendored
@ -708,7 +708,7 @@ const getSHAForPushEvent = (inputs, env, workingDirectory, isShallow, hasSubmodu
|
|||||||
let targetBranch = env.GITHUB_REF_NAME;
|
let targetBranch = env.GITHUB_REF_NAME;
|
||||||
const currentBranch = targetBranch;
|
const currentBranch = targetBranch;
|
||||||
let initialCommit = false;
|
let initialCommit = false;
|
||||||
if (isShallow && env.CHANGED_FILES_HISTORY_FETCHED !== 'true') {
|
if (isShallow) {
|
||||||
core.info('Repository is shallow, fetching more history...');
|
core.info('Repository is shallow, fetching more history...');
|
||||||
if (isTag) {
|
if (isTag) {
|
||||||
const sourceBranch = env.GITHUB_EVENT_BASE_REF.replace('refs/heads/', '') ||
|
const sourceBranch = env.GITHUB_EVENT_BASE_REF.replace('refs/heads/', '') ||
|
||||||
@ -852,7 +852,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
|||||||
if (inputs.sinceLastRemoteCommit) {
|
if (inputs.sinceLastRemoteCommit) {
|
||||||
targetBranch = currentBranch;
|
targetBranch = currentBranch;
|
||||||
}
|
}
|
||||||
if (isShallow && env.CHANGED_FILES_HISTORY_FETCHED !== 'true') {
|
if (isShallow) {
|
||||||
core.info('Repository is shallow, fetching more history...');
|
core.info('Repository is shallow, fetching more history...');
|
||||||
let prFetchExitCode = yield (0, utils_1.gitFetch)({
|
let prFetchExitCode = yield (0, utils_1.gitFetch)({
|
||||||
cwd: workingDirectory,
|
cwd: workingDirectory,
|
||||||
@ -1112,8 +1112,7 @@ const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
|
|||||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || '',
|
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || '',
|
||||||
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || '',
|
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || '',
|
||||||
GITHUB_REPOSITORY_OWNER: process.env.GITHUB_REPOSITORY_OWNER || '',
|
GITHUB_REPOSITORY_OWNER: process.env.GITHUB_REPOSITORY_OWNER || '',
|
||||||
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY || '',
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY || ''
|
||||||
CHANGED_FILES_HISTORY_FETCHED: process.env.CHANGED_FILES_HISTORY_FETCHED || ''
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
exports.getEnv = getEnv;
|
exports.getEnv = getEnv;
|
||||||
@ -1383,9 +1382,6 @@ const getChangedFilesFromLocalGit = ({ inputs, env, workingDirectory }) => __awa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`);
|
core.info(`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`);
|
||||||
if (isShallow) {
|
|
||||||
core.exportVariable('CHANGED_FILES_HISTORY_FETCHED', 'true');
|
|
||||||
}
|
|
||||||
const allDiffFiles = yield (0, changedFiles_1.getAllDiffFiles)({
|
const allDiffFiles = yield (0, changedFiles_1.getAllDiffFiles)({
|
||||||
workingDirectory,
|
workingDirectory,
|
||||||
hasSubmodule,
|
hasSubmodule,
|
||||||
|
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
@ -92,7 +92,7 @@ export const getSHAForPushEvent = async (
|
|||||||
const currentBranch = targetBranch
|
const currentBranch = targetBranch
|
||||||
let initialCommit = false
|
let initialCommit = false
|
||||||
|
|
||||||
if (isShallow && env.CHANGED_FILES_HISTORY_FETCHED !== 'true') {
|
if (isShallow) {
|
||||||
core.info('Repository is shallow, fetching more history...')
|
core.info('Repository is shallow, fetching more history...')
|
||||||
|
|
||||||
if (isTag) {
|
if (isTag) {
|
||||||
@ -271,7 +271,7 @@ export const getSHAForPullRequestEvent = async (
|
|||||||
targetBranch = currentBranch
|
targetBranch = currentBranch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isShallow && env.CHANGED_FILES_HISTORY_FETCHED !== 'true') {
|
if (isShallow) {
|
||||||
core.info('Repository is shallow, fetching more history...')
|
core.info('Repository is shallow, fetching more history...')
|
||||||
|
|
||||||
let prFetchExitCode = await gitFetch({
|
let prFetchExitCode = await gitFetch({
|
||||||
|
@ -19,7 +19,6 @@ export type Env = {
|
|||||||
GITHUB_EVENT_PULL_REQUEST_BASE_REF: string
|
GITHUB_EVENT_PULL_REQUEST_BASE_REF: string
|
||||||
GITHUB_REPOSITORY_OWNER: string
|
GITHUB_REPOSITORY_OWNER: string
|
||||||
GITHUB_REPOSITORY: string
|
GITHUB_REPOSITORY: string
|
||||||
CHANGED_FILES_HISTORY_FETCHED: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type GithubEvent = {
|
type GithubEvent = {
|
||||||
@ -76,8 +75,6 @@ export const getEnv = async (): Promise<Env> => {
|
|||||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || '',
|
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || '',
|
||||||
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || '',
|
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || '',
|
||||||
GITHUB_REPOSITORY_OWNER: process.env.GITHUB_REPOSITORY_OWNER || '',
|
GITHUB_REPOSITORY_OWNER: process.env.GITHUB_REPOSITORY_OWNER || '',
|
||||||
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY || '',
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY || ''
|
||||||
CHANGED_FILES_HISTORY_FETCHED:
|
|
||||||
process.env.CHANGED_FILES_HISTORY_FETCHED || ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,10 +109,6 @@ const getChangedFilesFromLocalGit = async ({
|
|||||||
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isShallow) {
|
|
||||||
core.exportVariable('CHANGED_FILES_HISTORY_FETCHED', 'true')
|
|
||||||
}
|
|
||||||
|
|
||||||
const allDiffFiles = await getAllDiffFiles({
|
const allDiffFiles = await getAllDiffFiles({
|
||||||
workingDirectory,
|
workingDirectory,
|
||||||
hasSubmodule,
|
hasSubmodule,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user