mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-12 23:06:57 +08:00
lint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Artifact, GetArtifactResponse} from '../shared/interfaces'
|
||||
import {GetArtifactResponse} from '../shared/interfaces'
|
||||
import {getOctokit} from '@actions/github'
|
||||
import {getUserAgentString} from '../shared/user-agent'
|
||||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||
|
||||
@@ -72,14 +72,14 @@ export async function listArtifacts(
|
||||
}
|
||||
|
||||
// Iterate over the first page
|
||||
listArtifactResponse.artifacts.forEach(artifact => {
|
||||
for (const artifact of listArtifactResponse.artifacts) {
|
||||
artifacts.push({
|
||||
name: artifact.name,
|
||||
id: artifact.id,
|
||||
url: artifact.url,
|
||||
size: artifact.size_in_bytes
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Iterate over any remaining pages
|
||||
for (
|
||||
@@ -99,19 +99,19 @@ export async function listArtifacts(
|
||||
page: currentPageNumber
|
||||
})
|
||||
|
||||
listArtifactResponse.artifacts.forEach(artifact => {
|
||||
for (const artifact of listArtifactResponse.artifacts) {
|
||||
artifacts.push({
|
||||
name: artifact.name,
|
||||
id: artifact.id,
|
||||
url: artifact.url,
|
||||
size: artifact.size_in_bytes
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
info(`Finished fetching artifact list`)
|
||||
|
||||
return {
|
||||
artifacts: artifacts
|
||||
artifacts
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user