mirror of https://github.com/actions/toolkit
Linter cleanups
parent
b2557ac90c
commit
19cdd5f210
|
@ -84,7 +84,6 @@ export async function restoreCache(
|
||||||
checkPaths(paths)
|
checkPaths(paths)
|
||||||
|
|
||||||
const cacheServiceVersion: string = config.getCacheServiceVersion()
|
const cacheServiceVersion: string = config.getCacheServiceVersion()
|
||||||
console.debug(`Cache service version: ${cacheServiceVersion}`)
|
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return await restoreCachev2(
|
return await restoreCachev2(
|
||||||
|
@ -246,7 +245,7 @@ async function restoreCachev2(
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
key: primaryKey,
|
key: primaryKey,
|
||||||
restoreKeys: restoreKeys,
|
restoreKeys,
|
||||||
version: utils.getCacheVersion(
|
version: utils.getCacheVersion(
|
||||||
paths,
|
paths,
|
||||||
compressionMethod,
|
compressionMethod,
|
||||||
|
@ -307,8 +306,6 @@ async function restoreCachev2(
|
||||||
core.debug(`Failed to delete archive: ${error}`)
|
core.debug(`Failed to delete archive: ${error}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -330,7 +327,6 @@ export async function saveCache(
|
||||||
checkKey(key)
|
checkKey(key)
|
||||||
|
|
||||||
const cacheServiceVersion: string = config.getCacheServiceVersion()
|
const cacheServiceVersion: string = config.getCacheServiceVersion()
|
||||||
console.debug(`Cache Service Version: ${cacheServiceVersion}`)
|
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case 'v2':
|
case 'v2':
|
||||||
return await saveCachev2(paths, key, options, enableCrossOsArchive)
|
return await saveCachev2(paths, key, options, enableCrossOsArchive)
|
||||||
|
@ -509,8 +505,8 @@ async function saveCachev2(
|
||||||
const request: CreateCacheEntryRequest = {
|
const request: CreateCacheEntryRequest = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
key: key,
|
key,
|
||||||
version: version
|
version
|
||||||
}
|
}
|
||||||
const response: CreateCacheEntryResponse =
|
const response: CreateCacheEntryResponse =
|
||||||
await twirpClient.CreateCacheEntry(request)
|
await twirpClient.CreateCacheEntry(request)
|
||||||
|
@ -526,8 +522,8 @@ async function saveCachev2(
|
||||||
const finalizeRequest: FinalizeCacheEntryUploadRequest = {
|
const finalizeRequest: FinalizeCacheEntryUploadRequest = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
key: key,
|
key,
|
||||||
version: version,
|
version,
|
||||||
sizeBytes: `${archiveFileSize}`
|
sizeBytes: `${archiveFileSize}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue