review-comments: refactor getActionsStatus to accept an extra parameter designating if the analysis is third-party

This commit is contained in:
Fotis Koutoulakis (@NlightNFotis) 2025-04-01 14:58:59 +01:00
parent 01f1a1f2c9
commit 55ee663d5f
30 changed files with 121 additions and 56 deletions

6
lib/api-client.js generated
View file

@ -206,12 +206,14 @@ function wrapApiConfigurationError(e) {
if ((0, util_1.isHTTPError)(e)) {
if (e.message.includes("API rate limit exceeded for installation") ||
e.message.includes("commit not found") ||
e.message.includes("Bad credentials") ||
e.message.includes("Not Found") ||
e.message.includes("Resource not accessible by integration") ||
/ref .* not found in this repository/.test(e.message)) {
return new util_1.ConfigurationError(e.message);
}
else if (e.message.includes("Bad credentials") ||
e.message.includes("Not Found")) {
return new util_1.ConfigurationError("Please check that your token is valid and has the required permissions: contents: read, security-events: write");
}
}
return e;
}