This commit is contained in:
Konrad Pabjan
2023-10-27 16:34:41 -04:00
parent 38d3e68bdc
commit 961a4a1557
4 changed files with 13 additions and 19 deletions

15
dist/index.js generated vendored
View File

@@ -9865,15 +9865,16 @@ async function processRuntimeResponse(res, requestOptions) {
return response return response
} }
async function getArtifactMetadata({githubToken, runId, artifactName}) { async function getArtifactMetadata({ githubToken, runId, artifactName }) {
const octokit = github.getOctokit(githubToken) const octokit = github.getOctokit(githubToken)
try { try {
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts?name={artifactName}', { console.log(`Fetching artifact metadata for run ${runId}...`)
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {
owner: github.context.repo.owner, owner: github.context.repo.owner,
repo: github.context.repo.repo, repo: github.context.repo.repo,
run_id: runId, run_id: runId
artifactName: artifactName
}) })
return response.data return response.data
@@ -10054,11 +10055,7 @@ const core = __nccwpck_require__(2186)
// All variables we need from the runtime are loaded here // All variables we need from the runtime are loaded here
const getContext = __nccwpck_require__(8454) const getContext = __nccwpck_require__(8454)
const { const { getArtifactMetadata, getPagesDeploymentStatus, cancelPagesDeployment } = __nccwpck_require__(572)
getArtifactMetadata,
getPagesDeploymentStatus,
cancelPagesDeployment
} = __nccwpck_require__(572)
const temporaryErrorStatus = { const temporaryErrorStatus = {
unknown_status: 'Unable to get deployment status.', unknown_status: 'Unable to get deployment status.',

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -54,15 +54,16 @@ async function processRuntimeResponse(res, requestOptions) {
return response return response
} }
async function getArtifactMetadata({githubToken, runId, artifactName}) { async function getArtifactMetadata({ githubToken, runId, artifactName }) {
const octokit = github.getOctokit(githubToken) const octokit = github.getOctokit(githubToken)
try { try {
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts?name={artifactName}', { console.log(`Fetching artifact metadata for run ${runId}...`)
const response = await octokit.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {
owner: github.context.repo.owner, owner: github.context.repo.owner,
repo: github.context.repo.repo, repo: github.context.repo.repo,
run_id: runId, run_id: runId
artifactName: artifactName
}) })
return response.data return response.data

View File

@@ -2,11 +2,7 @@ const core = require('@actions/core')
// All variables we need from the runtime are loaded here // All variables we need from the runtime are loaded here
const getContext = require('./context') const getContext = require('./context')
const { const { getArtifactMetadata, getPagesDeploymentStatus, cancelPagesDeployment } = require('./api-client')
getArtifactMetadata,
getPagesDeploymentStatus,
cancelPagesDeployment
} = require('./api-client')
const temporaryErrorStatus = { const temporaryErrorStatus = {
unknown_status: 'Unable to get deployment status.', unknown_status: 'Unable to get deployment status.',