Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Update files to format code #347

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/restoreImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BaseStateProvider } from "./stateProvider";
type Runner = "Linux" | "Windows" | "macOS";

async function restoreImpl(
stateProvider: BaseStateProvider
stateProvider: BaseStateProvider,
): Promise<string | undefined> {
try {
if (!utils.isCacheFeatureAvailable()) {
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/saveImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BaseStateProvider } from "./stateProvider";
process.on("uncaughtException", (e) => utils.logWarning(e.message));

async function saveImpl(
stateProvider: BaseStateProvider
stateProvider: BaseStateProvider,
): Promise<number | void> {
let cacheId = -1;
try {
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/actionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down