From 133584e9e68b569cc12954e2355947ab23d919e5 Mon Sep 17 00:00:00 2001 From: Jongwoo Han Date: Tue, 28 Nov 2023 00:29:29 +0900 Subject: [PATCH] style: Update files to format code --- src/restoreImpl.ts | 8 ++++---- src/saveImpl.ts | 4 ++-- src/utils/actionUtils.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/restoreImpl.ts b/src/restoreImpl.ts index 5e1da8e..70f13a2 100644 --- a/src/restoreImpl.ts +++ b/src/restoreImpl.ts @@ -7,7 +7,7 @@ import { BaseStateProvider } from "./stateProvider"; type Runner = "Linux" | "Windows" | "macOS"; async function restoreImpl( - stateProvider: BaseStateProvider + stateProvider: BaseStateProvider, ): Promise { try { if (!utils.isCacheFeatureAvailable()) { @@ -18,7 +18,7 @@ async function restoreImpl( if (!utils.isValidEvent()) { const eventName = process.env[Events.Key] || ""; utils.logWarning( - `Event Validation Error: The event type ${eventName} is not supported because it's not tied to a branch or tag ref.` + `Event Validation Error: The event type ${eventName} is not supported because it's not tied to a branch or tag ref.`, ); return; } @@ -40,12 +40,12 @@ async function restoreImpl( const cacheKey: string | undefined = await cache.restoreCache( cachePaths, primaryKey, - restoreKeys + restoreKeys, ); if (!cacheKey) { core.info( - `Cache not found for keys: ${[primaryKey, ...restoreKeys].join(", ")}` + `Cache not found for keys: ${[primaryKey, ...restoreKeys].join(", ")}`, ); return; diff --git a/src/saveImpl.ts b/src/saveImpl.ts index 2de1d20..f6b0bae 100644 --- a/src/saveImpl.ts +++ b/src/saveImpl.ts @@ -7,7 +7,7 @@ import { BaseStateProvider } from "./stateProvider"; process.on("uncaughtException", (e) => utils.logWarning(e.message)); async function saveImpl( - stateProvider: BaseStateProvider + stateProvider: BaseStateProvider, ): Promise { let cacheId = -1; try { @@ -28,7 +28,7 @@ async function saveImpl( if (utils.isExactKeyMatch(primaryKey, state)) { core.info( - `Cache hit occurred on the primary key ${primaryKey}, not saving cache.` + `Cache hit occurred on the primary key ${primaryKey}, not saving cache.`, ); return; } diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index 5d86d63..2f797a9 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -29,7 +29,7 @@ export function isValidEvent(): boolean { export function getInputAsArray( name: string, - options?: core.InputOptions + options?: core.InputOptions, ): string[] { return core .getInput(name, options) @@ -46,13 +46,13 @@ export function isCacheFeatureAvailable(): boolean { if (isGhes()) { logWarning( `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not. -Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)` +Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`, ); return false; } logWarning( - "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions." + "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.", ); return false; }