mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Improve function name
This commit is contained in:
7
lib/upload-lib.js
generated
7
lib/upload-lib.js
generated
@@ -332,7 +332,7 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
|
||||
}
|
||||
else if (status === "failed") {
|
||||
const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`;
|
||||
throw areProcessingErrorsUserError(response.data.errors)
|
||||
throw shouldConsiderAsUserError(response.data.errors)
|
||||
? new util_1.UserError(message)
|
||||
: new Error(message);
|
||||
}
|
||||
@@ -349,7 +349,10 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
|
||||
}
|
||||
}
|
||||
exports.waitForProcessing = waitForProcessing;
|
||||
function areProcessingErrorsUserError(processingErrors) {
|
||||
/**
|
||||
* Returns whether the provided processing errors should be considered a user error.
|
||||
*/
|
||||
function shouldConsiderAsUserError(processingErrors) {
|
||||
return (processingErrors.length === 1 &&
|
||||
processingErrors[0] ===
|
||||
"CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled");
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user