mirror of
https://github.com/actions/toolkit.git
synced 2026-08-12 00:00:17 +02:00
Resolved comments
This commit is contained in:
+7
@@ -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";
|
||||
}
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user