Request meta endpoint at the start of execution
This commit is contained in:
parent
8d18e347a7
commit
81a21bfa1e
46 changed files with 348 additions and 259 deletions
9
lib/runner.js
generated
9
lib/runner.js
generated
|
|
@ -107,6 +107,10 @@ program
|
|||
auth: cmd.githubAuth,
|
||||
url: util_1.parseGithubUrl(cmd.githubUrl),
|
||||
};
|
||||
const ghesVersion = await util_1.getGHESVersion(apiDetails);
|
||||
if (ghesVersion !== undefined) {
|
||||
util_1.checkGHESVersionInRange(ghesVersion, "runner", logger);
|
||||
}
|
||||
let codeql;
|
||||
if (cmd.codeqlPath !== undefined) {
|
||||
codeql = codeql_1.getCodeQL(cmd.codeqlPath);
|
||||
|
|
@ -114,7 +118,7 @@ program
|
|||
else {
|
||||
codeql = (await init_1.initCodeQL(undefined, apiDetails, tempDir, toolsDir, "runner", logger)).codeql;
|
||||
}
|
||||
const config = await init_1.initConfig(cmd.languages, cmd.queries, cmd.configFile, repository_1.parseRepositoryNwo(cmd.repository), tempDir, toolsDir, codeql, cmd.checkoutPath || process.cwd(), apiDetails, "runner", logger);
|
||||
const config = await init_1.initConfig(cmd.languages, cmd.queries, cmd.configFile, repository_1.parseRepositoryNwo(cmd.repository), tempDir, toolsDir, codeql, cmd.checkoutPath || process.cwd(), ghesVersion, apiDetails, logger);
|
||||
const tracerConfig = await init_1.runInit(codeql, config);
|
||||
if (tracerConfig === undefined) {
|
||||
return;
|
||||
|
|
@ -253,7 +257,8 @@ program
|
|||
url: util_1.parseGithubUrl(cmd.githubUrl),
|
||||
};
|
||||
try {
|
||||
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, apiDetails, "runner", logger);
|
||||
const ghesVersion = await util_1.getGHESVersion(apiDetails);
|
||||
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, parseRef(cmd.ref), undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, ghesVersion, apiDetails, "runner", logger);
|
||||
}
|
||||
catch (e) {
|
||||
logger.error("Upload failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue