1
0
Fork 0

Cleanup download-all interfaces

pull/1495/head
Konrad Pabjan 2023-08-17 13:54:51 -04:00
parent 814aedd45a
commit bd41eaf093
3 changed files with 6 additions and 30 deletions

View File

@ -107,8 +107,8 @@ jobs:
script: |
const artifact = require('./packages/artifact/lib/artifact')
const workflowRunId = ${{ process.env.GITHUB_RUN_ID }}
const repository = '${{ process.env.GITHUB_REPOSITORY }}'
const workflowRunId = process.env.GITHUB_RUN_ID
const repository = process.env.GITHUB_REPOSITORY
const repositoryOwner = repository.split('/')[0]
const repositoryName = repository.split('/')[1]

View File

@ -3,7 +3,7 @@ import {isGhes} from './shared/config'
import {
UploadOptions,
UploadResponse,
DownloadSingleArtifactOptions,
DownloadArtifactOptions,
GetArtifactResponse,
ListArtifactsResponse,
DownloadArtifactResponse
@ -86,7 +86,7 @@ export interface ArtifactClient {
repositoryOwner: string,
repositoryName: string,
token: string,
options?: DownloadSingleArtifactOptions
options?: DownloadArtifactOptions
): Promise<DownloadArtifactResponse>
}
@ -140,7 +140,7 @@ If the error persists, please check whether Actions is operating normally at [ht
repositoryOwner: string,
repositoryName: string,
token: string,
options?: DownloadSingleArtifactOptions
options?: DownloadArtifactOptions
): Promise<DownloadArtifactResponse> {
if (isGhes()) {
warning(

View File

@ -87,24 +87,7 @@ export interface DownloadArtifactResponse {
artifact?: Artifact
}
export interface DownloadAllArtifactsResponse {
/**
* If the artifact download was successful
*/
success: boolean
/**
* The cumulative size of all the artifacts that were downloaded
*/
size: number
/**
* Metadata about the artifact that was downloaded
*/
artifacts: Artifact[]
}
export interface DownloadSingleArtifactOptions {
export interface DownloadArtifactOptions {
/**
* Denotes where the artifact will be downloaded to. If not specified then the artifact is download to GITHUB_WORKSPACE
*/
@ -117,13 +100,6 @@ export interface DownloadSingleArtifactOptions {
createArtifactFolder?: boolean
}
export interface DownloadAllArtifactsOptions {
/**
* Denotes where the artifact will be downloaded to. If not specified then the artifact is download to GITHUB_WORKSPACE
*/
path?: string
}
/*****************************************************************************
* *
* Shared *