Fix invalid API call when running locally
The method getAnalysisKey would call getWorkflowPath and raise an API Error. This change follows the pattern in prepareLocalRunEnvironment to set a dummy value for the required environment variable, therefore shortcutting the API request.
This commit is contained in:
parent
bc1ee1620f
commit
5c0e2f93f1
7 changed files with 61 additions and 2 deletions
3
lib/actions-util.js
generated
3
lib/actions-util.js
generated
|
|
@ -58,6 +58,9 @@ function prepareLocalRunEnvironment() {
|
|||
if (!process.env.GITHUB_JOB) {
|
||||
core.exportVariable("GITHUB_JOB", "UNKNOWN-JOB");
|
||||
}
|
||||
if (!process.env.CODEQL_ACTION_ANALYSIS_KEY) {
|
||||
core.exportVariable("CODEQL_ACTION_ANALYSIS_KEY", `LOCAL-RUN:${process.env.GITHUB_JOB}`);
|
||||
}
|
||||
}
|
||||
exports.prepareLocalRunEnvironment = prepareLocalRunEnvironment;
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue