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: | script: |
const artifact = require('./packages/artifact/lib/artifact') const artifact = require('./packages/artifact/lib/artifact')
const workflowRunId = ${{ process.env.GITHUB_RUN_ID }} const workflowRunId = process.env.GITHUB_RUN_ID
const repository = '${{ process.env.GITHUB_REPOSITORY }}' const repository = process.env.GITHUB_REPOSITORY
const repositoryOwner = repository.split('/')[0] const repositoryOwner = repository.split('/')[0]
const repositoryName = repository.split('/')[1] const repositoryName = repository.split('/')[1]

View File

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

View File

@ -87,24 +87,7 @@ export interface DownloadArtifactResponse {
artifact?: Artifact artifact?: Artifact
} }
export interface DownloadAllArtifactsResponse { export interface DownloadArtifactOptions {
/**
* 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 {
/** /**
* Denotes where the artifact will be downloaded to. If not specified then the artifact is download to GITHUB_WORKSPACE * 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 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 * * Shared *