mirror of https://github.com/actions/toolkit
fix results url construction
parent
9e7201ff5b
commit
a920781ca9
|
@ -52,8 +52,8 @@ class ArtifactHttpClient implements Rpc {
|
||||||
contentType: 'application/json' | 'application/protobuf',
|
contentType: 'application/json' | 'application/protobuf',
|
||||||
data: object | Uint8Array
|
data: object | Uint8Array
|
||||||
): Promise<object | Uint8Array> {
|
): Promise<object | Uint8Array> {
|
||||||
const url = `${this.baseUrl}/twirp/${service}/${method}`
|
const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href
|
||||||
debug(`Requesting ${url}`)
|
debug(`Requesting: ${url}`)
|
||||||
const headers = {
|
const headers = {
|
||||||
'Content-Type': contentType
|
'Content-Type': contentType
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ export function getResultsServiceUrl(): string {
|
||||||
if (!resultsUrl) {
|
if (!resultsUrl) {
|
||||||
throw new Error('Unable to get the ACTIONS_RESULTS_URL env variable')
|
throw new Error('Unable to get the ACTIONS_RESULTS_URL env variable')
|
||||||
}
|
}
|
||||||
return resultsUrl
|
|
||||||
|
return new URL(resultsUrl).origin
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isGhes(): boolean {
|
export function isGhes(): boolean {
|
||||||
|
|
Loading…
Reference in New Issue