INNER CODE UNIT · JavaScript
uploadErrorLog
Legit-Labs/legitify · index.js:19
async function uploadErrorLog() {
const fileName = "error.log";
try {
if (fs.existsSync(fileName)) {
const client = artifact.create();
await client.uploadArtifact(fileName, [fileName], ".", context.runId);
console.log(`Uploaded ${fileName} to the workflow artifact`);
} else {
console.log(`File ${fileName} does not exist so skipping upload`);
}
} catch (error) {
console.error(error);
}
}
async function isPrivateRepo(token) {
const repoName = process.env.GITHUB_REPOSITORY;
if (!repoName) {