(debug)
| 37 | fs.mkdirSync(logsPath) |
| 38 | } |
| 39 | export function getUploadArtifactInject(debug) { |
| 40 | return (name, contents) => { |
| 41 | const logFilename = path.join(logsPath, `${new Date().toISOString().substr(0, 16)}-${name}`) |
| 42 | if (debug) { |
| 43 | fs.writeFileSync(logFilename, contents) |
| 44 | console.log(`${name} artifact upload written to ${logFilename}`) |
| 45 | } else { |
| 46 | console.log(`Debug not enabled. ${name} artifact NOT written to ${logFilename}`) |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // Uses local process.env GITHUB_TOKEN to create an octokit instance |
| 52 | export const octokitInject = github() |
no outgoing calls
no test coverage detected