Use typed-rest-client/HttpClient in preference to @actions/HttpClient

This commit is contained in:
daz 2025-01-30 13:47:12 -07:00
parent 94baf225fe
commit 44db8041a5
No known key found for this signature in database
4 changed files with 3 additions and 4 deletions

View File

@ -38,7 +38,6 @@
"@actions/exec": "1.1.1",
"@actions/github": "6.0.0",
"@actions/glob": "0.5.0",
"@actions/http-client": "2.2.3",
"@actions/tool-cache": "2.0.2",
"@octokit/rest": "21.1.0",
"@octokit/webhooks-types": "7.6.1",

View File

@ -67,7 +67,7 @@ export async function getToken(accessKey: string, expiry: string): Promise<Devel
}
class ShortLivedTokenClient {
httpc = new httpm.HttpClient('gradle/actions/setup-gradle')
httpc = new httpm.HttpClient('gradle/actions')
maxRetries = 3
retryInterval = 1000

View File

@ -1,7 +1,7 @@
import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import * as httpm from '@actions/http-client'
import * as httpm from 'typed-rest-client/HttpClient'
import * as core from '@actions/core'
import * as cache from '@actions/cache'
import * as toolCache from '@actions/tool-cache'

View File

@ -4,7 +4,7 @@ import * as core from '@actions/core'
import fileWrapperChecksums from './wrapper-checksums.json'
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, {allowRetries: true, maxRetries: 3})
const httpc = new httpm.HttpClient('gradle/actions', undefined, {allowRetries: true, maxRetries: 3})
export class WrapperChecksums {
checksums = new Map<string, Set<string>>()