This commit is contained in:
Deepak Dahiya
2022-03-30 07:22:56 +00:00
committed by GitHub
parent 6d774fcb59
commit 7756e7c4cb
5 changed files with 22 additions and 641 deletions
+2 -5
View File
@@ -143,7 +143,7 @@ export async function reserveCache(
key: string,
paths: string[],
options?: InternalCacheOptions
): Promise<number> {
): Promise<ITypedResponse<ReserveCacheResponse>> {
const httpClient = createHttpClient()
const version = getCacheVersion(paths, options?.compressionMethod)
@@ -158,10 +158,7 @@ export async function reserveCache(
reserveCacheRequest
)
)
if(response?.statusCode === 400){
return -2
}
return response?.result?.cacheId ?? -1
return response
}
function getContentRange(start: number, end: number): string {
-7
View File
@@ -123,10 +123,3 @@ export function assertDefined<T>(name: string, value?: T): T {
return value
}
export function isGhes(): boolean {
const ghUrl = new URL(
process.env["GITHUB_SERVER_URL"] || "https://github.com"
);
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
}