From e093ab00fc1b768a50688cf6696c0e4b9744f754 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Mon, 28 Mar 2022 14:25:43 +0530 Subject: [PATCH] linting errors --- dist/restore/index.js | 2 +- dist/save/index.js | 2 +- src/utils/actionUtils.ts | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index 508d600..e3bd833 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -37458,9 +37458,9 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; +const cache = __importStar(__webpack_require__(692)); const core = __importStar(__webpack_require__(470)); const constants_1 = __webpack_require__(196); -const cache = __importStar(__webpack_require__(692)); function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); return ghUrl.hostname.toUpperCase() !== "GITHUB.COM"; diff --git a/dist/save/index.js b/dist/save/index.js index 11c6f9d..d15050c 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -37458,9 +37458,9 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0; +const cache = __importStar(__webpack_require__(692)); const core = __importStar(__webpack_require__(470)); const constants_1 = __webpack_require__(196); -const cache = __importStar(__webpack_require__(692)); function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); return ghUrl.hostname.toUpperCase() !== "GITHUB.COM"; diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index cd0ddeb..69e0220 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -1,7 +1,7 @@ +import * as cache from "@actions/cache"; import * as core from "@actions/core"; import { Outputs, RefKey, State } from "../constants"; -import * as cache from "@actions/cache"; export function isGhes(): boolean { const ghUrl = new URL( @@ -78,12 +78,11 @@ export function getInputAsInt( export function isCacheFeatureAvailable(): boolean { if (!cache.isFeatureAvailable()) { - if (isGhes()){ + 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." ); - } - else{ + } else { logWarning( "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions." );