Skip to content

Commit

Permalink
More logs
Browse files Browse the repository at this point in the history
  • Loading branch information
xSAVIKx committed Jan 3, 2024
1 parent f89e736 commit ba97e85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122164,15 +122164,18 @@ const fs = __nccwpck_require__(7147);

async function getArtifact(name) {
try {
core.debug("Listing all artifacts.")
const allArtifacts = await artifactClient.listArtifacts();
core.warning(`AllArtifacts: ${JSON.stringify(allArtifacts)}`)
core.debug(`Retrieving artifact with name '${name}'.`)
const getArtifactResponse = await artifactClient.getArtifact(name);
core.info(
`Artifact ${getArtifactResponse.artifact.name} exists
and has ID ${getArtifactResponse.artifact.id}.`,
);
return getArtifactResponse;
} catch (err) {
core.debug(`Error details: ${JSON.stringify(err)}`)
core.info(`Artifact ${name} does not exist.`);
}
return null;
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ const fs = require("fs");

async function getArtifact(name) {
try {
core.debug("Listing all artifacts.")
const allArtifacts = await artifactClient.listArtifacts();
core.warning(`AllArtifacts: ${JSON.stringify(allArtifacts)}`)
core.debug(`Retrieving artifact with name '${name}'.`)
const getArtifactResponse = await artifactClient.getArtifact(name);
core.info(
`Artifact ${getArtifactResponse.artifact.name} exists
and has ID ${getArtifactResponse.artifact.id}.`,
);
return getArtifactResponse;
} catch (err) {
core.debug(`Error details: ${JSON.stringify(err)}`)
core.info(`Artifact ${name} does not exist.`);
}
return null;
Expand Down

0 comments on commit ba97e85

Please sign in to comment.