mirror of
https://github.com/github/codeql-action.git
synced 2025-12-08 00:38:30 +08:00
Compare commits
2 Commits
codeql-bun
...
nickfyson/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2b7b07642 | ||
|
|
1d9a8391a3 |
4
lib/analyze-action.js
generated
4
lib/analyze-action.js
generated
@@ -177,6 +177,10 @@ async function run() {
|
||||
core.setOutput("db-locations", dbLocations);
|
||||
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
// check if env var GITHUB_ACTION is set to any value
|
||||
if (process.env.GITHUB_ACTION) {
|
||||
throw new Error("deliberately exit early");
|
||||
}
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
|
||||
File diff suppressed because one or more lines are too long
23
lib/upload-lib.js
generated
23
lib/upload-lib.js
generated
@@ -375,9 +375,26 @@ exports.waitForProcessing = waitForProcessing;
|
||||
* Returns whether the provided processing errors are a configuration error.
|
||||
*/
|
||||
function shouldConsiderConfigurationError(processingErrors) {
|
||||
return (processingErrors.length === 1 &&
|
||||
processingErrors[0] ===
|
||||
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled");
|
||||
// TODO add a new case here handling...
|
||||
// Advanced setup is not enabled for this repository
|
||||
if (processingErrors.length !== 1) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
// if (
|
||||
// processingErrors[0] ===
|
||||
// "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
|
||||
// ) {
|
||||
// return true;
|
||||
// }
|
||||
// if (
|
||||
// processingErrors[0].includes(
|
||||
// "Advanced setup is not enabled for this repository",
|
||||
// )
|
||||
// ) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
}
|
||||
/**
|
||||
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -281,6 +281,12 @@ async function run() {
|
||||
core.setOutput("db-locations", dbLocations);
|
||||
core.setOutput("sarif-output", path.resolve(outputDir));
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
|
||||
// check if env var GITHUB_ACTION is set to any value
|
||||
if (process.env.GITHUB_ACTION) {
|
||||
throw new Error("deliberately exit early");
|
||||
}
|
||||
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFromActions(
|
||||
outputDir,
|
||||
|
||||
@@ -519,11 +519,26 @@ export async function waitForProcessing(
|
||||
* Returns whether the provided processing errors are a configuration error.
|
||||
*/
|
||||
function shouldConsiderConfigurationError(processingErrors: string[]): boolean {
|
||||
return (
|
||||
processingErrors.length === 1 &&
|
||||
processingErrors[0] ===
|
||||
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
|
||||
);
|
||||
// TODO add a new case here handling...
|
||||
// Advanced setup is not enabled for this repository
|
||||
if (processingErrors.length !== 1) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
// if (
|
||||
// processingErrors[0] ===
|
||||
// "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
|
||||
// ) {
|
||||
// return true;
|
||||
// }
|
||||
// if (
|
||||
// processingErrors[0].includes(
|
||||
// "Advanced setup is not enabled for this repository",
|
||||
// )
|
||||
// ) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user