This commit is contained in:
Bethany committed 2023-08-22 10:06:40 -07:00
1 parent af762e2836
commit cbe3f44b01
7 files changed
+13 -13

No files matched your search

@@ -1,6 +1,5 @@
import path from 'path'
import fs from 'fs/promises'
import {PathLike} from 'fs'
import * as github from '@actions/github'
import * as core from '@actions/core'
import * as httpClient from '@actions/http-client'
+1 -1
View File
@@ -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'
+5 -5
View File
@@ -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
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
var packageJson = require('../../../package.json')
import * as packageJson from '../../../package.json'
/**
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
+1 -1
View File
@@ -91,6 +91,6 @@ export async function uploadZipToBlobStorage(
return {
isSuccess: true,
uploadSize: uploadByteCount,
md5Hash: md5Hash
md5Hash
}
}
+3 -3
View File
@@ -61,7 +61,7 @@ export async function uploadArtifact(
const createArtifactReq: CreateArtifactRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
name: name,
name,
version: 4
}
@@ -96,13 +96,13 @@ export async function uploadArtifact(
const finalizeArtifactReq: FinalizeArtifactRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
name: name,
name,
size: uploadResult.uploadSize!.toString()
}
if (uploadResult.md5Hash) {
finalizeArtifactReq.hash = StringValue.create({
value: `md5:${uploadResult.md5Hash!}`
value: `md5:${uploadResult.md5Hash}`
})
}
+2 -1
View File
@@ -16,5 +16,6 @@
},
"include": [
"./src"
]
],
"resolveJsonModule": true
}