mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 19:20:08 +08:00
review-comments: refactor getActionsStatus to accept an extra parameter designating if the analysis is third-party
This commit is contained in:
@@ -245,12 +245,17 @@ export function wrapApiConfigurationError(e: unknown) {
|
||||
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 ConfigurationError(e.message);
|
||||
} else if (
|
||||
e.message.includes("Bad credentials") ||
|
||||
e.message.includes("Not Found")
|
||||
) {
|
||||
return new ConfigurationError(
|
||||
"Please check that your token is valid and has the required permissions: contents: read, security-events: write",
|
||||
);
|
||||
}
|
||||
}
|
||||
return e;
|
||||
|
||||
Reference in New Issue
Block a user