feat: add support for recovering deleted files (#1269)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
10
src/main.ts
10
src/main.ts
@@ -1,6 +1,6 @@
|
||||
import * as core from '@actions/core'
|
||||
import path from 'path'
|
||||
import {getAllDiffFiles, getRenamedFiles} from './changedFiles'
|
||||
import {ChangeTypeEnum, getAllDiffFiles, getRenamedFiles} from './changedFiles'
|
||||
import {setChangedFilesOutput} from './changedFilesOutput'
|
||||
import {
|
||||
DiffResult,
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
getSubmodulePath,
|
||||
getYamlFilePatterns,
|
||||
isRepoShallow,
|
||||
recoverDeletedFiles,
|
||||
setOutput,
|
||||
submoduleExists,
|
||||
updateGitGlobalConfig,
|
||||
@@ -118,6 +119,13 @@ export async function run(): Promise<void> {
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
|
||||
await recoverDeletedFiles({
|
||||
inputs,
|
||||
workingDirectory,
|
||||
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
|
||||
sha: diffResult.previousSha
|
||||
})
|
||||
|
||||
const filePatterns = await getFilePatterns({
|
||||
inputs,
|
||||
workingDirectory
|
||||
|
||||
Reference in New Issue
Block a user