MCPcopy Create free account
hub / github.com/github/docs / getUploadArtifactInject

Function getUploadArtifactInject

script/helpers/action-injections.js:39–49  ·  view source on GitHub ↗
(debug)

Source from the content-addressed store, hash-verified

37 fs.mkdirSync(logsPath)
38}
39export 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
52export const octokitInject = github()

Calls

no outgoing calls

Tested by

no test coverage detected