mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Categorize Code Quality "not enabled" upload failure as user-error
When a repository requests Code Quality analysis but it is not enabled, the SARIF upload to `PUT /repos/:owner/:repo/code-quality/analysis` returns a 403 with the message "Code quality is not enabled for this repository...". `isEnablementError` did not recognize this wording, so `wrapApiConfigurationError` left it as a plain Error and the analyze job was reported with `status=failure` instead of `user-error`. Add a `/Code Quality is not enabled/i` pattern so the error becomes a ConfigurationError and `getActionsStatus` categorizes it as `user-error`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
3
lib/entry-points.js
generated
3
lib/entry-points.js
generated
@@ -149561,7 +149561,8 @@ function isEnablementError(msg) {
|
||||
return [
|
||||
/Code Security must be enabled/i,
|
||||
/Advanced Security must be enabled/i,
|
||||
/Code Scanning is not enabled/i
|
||||
/Code Scanning is not enabled/i,
|
||||
/Code Quality is not enabled/i
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
|
||||
Reference in New Issue
Block a user