Skip to content

Commit 53abef8

Browse files
authored
4.0.3 - Fix download artifact (#11)
* Fix downloadArtifact usage * Bump to v4.0.3
1 parent 6fe2dd1 commit 53abef8

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

dist/index.js

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,19 @@ async function getCoverage() {
411411
core.debug(`getCoverage: Starting...`)
412412

413413
const artifactClient = new DefaultArtifactClient()
414-
const artifactName = 'coverageArtifact'
415-
const path = '~/downloads'
414+
415+
core.debug(`getCoverage: Getting artifact id...`)
416+
417+
const { artifact } = await artifactClient.getArtifact('coverageArtifact')
418+
419+
core.debug(
420+
`getCoverage: artifact metadata = ${JSON.stringify(artifact, null, 2)}`
421+
)
416422

417423
core.debug(`getCoverage: Downloading artifact...`)
418424

419-
const downloadResult = await artifactClient.downloadArtifact(artifactName, {
420-
path
425+
const downloadResult = await artifactClient.downloadArtifact(artifact.id, {
426+
path: '~/downloads'
421427
})
422428

423429
core.debug(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diff-coverage",
3-
"version": "4.0.2",
3+
"version": "4.0.3",
44
"description": "Checks that the added and modified lines are covered by unit tests",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)