Resolved comments

This commit is contained in:
Apple
2022-04-01 01:41:12 +05:30
parent 3abbc6c24c
commit 6cd8286138
5 changed files with 27 additions and 19 deletions

View File

@@ -123,3 +123,10 @@ 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";
}

View File

@@ -1,9 +1,9 @@
import {CompressionMethod} from './constants'
import {ITypedResponse} from '@actions/http-client/interfaces'
import {HttpClientError} from '@actions/http-client'
export interface ITypedResponseWithErrorMessage<T> extends ITypedResponse<T> {
message?: string
typeKey?: string
error?: HttpClientError
}
export interface ArtifactCacheEntry {

View File

@@ -110,8 +110,7 @@ export async function retryTypedResponse<T>(
statusCode: error.statusCode,
result: null,
headers: {},
message: error.message,
typeKey: error.result.typeKey
error: error
}
} else {
return undefined