1
0
Fork 0

include get artifact changes

pull/1503/head
Bethany 2023-08-23 10:40:25 -07:00
parent 06e751600e
commit 291200d54f
1 changed files with 1 additions and 8 deletions

View File

@ -8,9 +8,6 @@ import {retry} from '@octokit/plugin-retry'
import * as core from '@actions/core' import * as core from '@actions/core'
import {OctokitOptions} from '@octokit/core/dist-types/types' import {OctokitOptions} from '@octokit/core/dist-types/types'
const maxRetryNumber = 5
const exemptStatusCodes = [400, 401, 403, 404, 422] // https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
export async function getArtifact( export async function getArtifact(
artifactName: string, artifactName: string,
workflowRunId: number, workflowRunId: number,
@ -18,11 +15,7 @@ export async function getArtifact(
repositoryName: string, repositoryName: string,
token: string token: string
): Promise<GetArtifactResponse> { ): Promise<GetArtifactResponse> {
const [retryOpts, requestOpts] = getRetryOptions( const [retryOpts, requestOpts] = getRetryOptions(defaultGitHubOptions)
maxRetryNumber,
exemptStatusCodes,
defaultGitHubOptions
)
const opts: OctokitOptions = { const opts: OctokitOptions = {
log: undefined, log: undefined,