Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 961a4a1

Browse files
committed
WIP
1 parent 38d3e68 commit 961a4a1

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

dist/index.js

Lines changed: 6 additions & 9 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.

src/internal/api-client.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@ async function processRuntimeResponse(res, requestOptions) {
5454
return response
5555
}
5656

57-
async function getArtifactMetadata({githubToken, runId, artifactName}) {
57+
async function getArtifactMetadata({ githubToken, runId, artifactName }) {
5858
const octokit = github.getOctokit(githubToken)
5959

6060
try {
61-
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts?name={artifactName}', {
61+
console.log(`Fetching artifact metadata for run ${runId}...`)
62+
63+
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {
6264
owner: github.context.repo.owner,
6365
repo: github.context.repo.repo,
64-
run_id: runId,
65-
artifactName: artifactName
66+
run_id: runId
6667
})
6768

6869
return response.data

src/internal/deployment.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ const core = require('@actions/core')
22

33
// All variables we need from the runtime are loaded here
44
const getContext = require('./context')
5-
const {
6-
getArtifactMetadata,
7-
getPagesDeploymentStatus,
8-
cancelPagesDeployment
9-
} = require('./api-client')
5+
const { getArtifactMetadata, getPagesDeploymentStatus, cancelPagesDeployment } = require('./api-client')
106

117
const temporaryErrorStatus = {
128
unknown_status: 'Unable to get deployment status.',

0 commit comments

Comments
 (0)