Merge branch 'master' into analysisName
This commit is contained in:
commit
52cd1f2261
15 changed files with 279 additions and 75 deletions
10
lib/util.js
generated
10
lib/util.js
generated
|
|
@ -15,6 +15,8 @@ const http = __importStar(require("@actions/http-client"));
|
|||
const auth = __importStar(require("@actions/http-client/auth"));
|
||||
const octokit = __importStar(require("@octokit/rest"));
|
||||
const console_log_level_1 = __importDefault(require("console-log-level"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
const sharedEnv = __importStar(require("./shared-environment"));
|
||||
/**
|
||||
|
|
@ -321,3 +323,11 @@ function getToolNames(sarifContents) {
|
|||
return Object.keys(toolNames);
|
||||
}
|
||||
exports.getToolNames = getToolNames;
|
||||
// Creates a random temporary directory, runs the given body, and then deletes the directory.
|
||||
// Mostly intended for use within tests.
|
||||
async function withTmpDir(body) {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codeql-action-'));
|
||||
await body(tmpDir);
|
||||
fs.rmdirSync(tmpDir, { recursive: true });
|
||||
}
|
||||
exports.withTmpDir = withTmpDir;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue