consume new pb wrappers

This commit is contained in:
Rob Herley
2023-11-30 19:10:07 +00:00
committed by GitHub
parent 695bf98f84
commit e9d6649a14
4 changed files with 24 additions and 28 deletions

View File

@@ -107,9 +107,7 @@ export async function downloadArtifactInternal(
const listReq: ListArtifactsRequest = {
workflowRunBackendId,
workflowJobRunBackendId,
nameFilter: '',
idFilter: '0' // TODO(robherley): zero values are awkward, use pb wrappers
workflowJobRunBackendId
}
const {artifacts} = await artifactClient.ListArtifacts(listReq)

View File

@@ -9,7 +9,7 @@ import {GetArtifactResponse} from '../shared/interfaces'
import {getBackendIdsFromToken} from '../shared/util'
import {getUserAgentString} from '../shared/user-agent'
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
import {ListArtifactsRequest} from '../../generated'
import {ListArtifactsRequest, StringValue} from '../../generated'
export async function getArtifactPublic(
artifactName: string,
@@ -81,8 +81,7 @@ export async function getArtifactInternal(
const req: ListArtifactsRequest = {
workflowRunBackendId,
workflowJobRunBackendId,
nameFilter: artifactName,
idFilter: '0' // TODO(robherley): int64 zero value, change this to be optional
nameFilter: StringValue.create({value: artifactName})
}
const res = await artifactClient.ListArtifacts(req)

View File

@@ -111,9 +111,7 @@ export async function listArtifactsInternal(): Promise<ListArtifactsResponse> {
const req: ListArtifactsRequest = {
workflowRunBackendId,
workflowJobRunBackendId,
nameFilter: '',
idFilter: '0' // TODO(robherley): zero values are awkward, use pb wrappers
workflowJobRunBackendId
}
const res = await artifactClient.ListArtifacts(req)