mirror of
https://github.com/github/codeql-action.git
synced 2025-12-17 21:09:40 +08:00
Compare commits
2 Commits
copilot/up
...
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("db-locations", dbLocations);
|
||||||
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
||||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
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") {
|
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||||
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger);
|
||||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
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.
|
* Returns whether the provided processing errors are a configuration error.
|
||||||
*/
|
*/
|
||||||
function shouldConsiderConfigurationError(processingErrors) {
|
function shouldConsiderConfigurationError(processingErrors) {
|
||||||
return (processingErrors.length === 1 &&
|
// TODO add a new case here handling...
|
||||||
processingErrors[0] ===
|
// Advanced setup is not enabled for this repository
|
||||||
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled");
|
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.
|
* 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("db-locations", dbLocations);
|
||||||
core.setOutput("sarif-output", path.resolve(outputDir));
|
core.setOutput("sarif-output", path.resolve(outputDir));
|
||||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
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") {
|
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||||
uploadResult = await uploadLib.uploadFromActions(
|
uploadResult = await uploadLib.uploadFromActions(
|
||||||
outputDir,
|
outputDir,
|
||||||
|
|||||||
@@ -519,11 +519,26 @@ export async function waitForProcessing(
|
|||||||
* Returns whether the provided processing errors are a configuration error.
|
* Returns whether the provided processing errors are a configuration error.
|
||||||
*/
|
*/
|
||||||
function shouldConsiderConfigurationError(processingErrors: string[]): boolean {
|
function shouldConsiderConfigurationError(processingErrors: string[]): boolean {
|
||||||
return (
|
// TODO add a new case here handling...
|
||||||
processingErrors.length === 1 &&
|
// Advanced setup is not enabled for this repository
|
||||||
processingErrors[0] ===
|
if (processingErrors.length !== 1) {
|
||||||
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled"
|
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