mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 22:50:17 +08:00
Make error message tests less brittle
This commit is contained in:
5
lib/analyze-action.js
generated
5
lib/analyze-action.js
generated
@@ -83628,6 +83628,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -83646,7 +83649,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
5
lib/init-action-post.js
generated
5
lib/init-action-post.js
generated
@@ -116765,6 +116765,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -116783,7 +116786,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
5
lib/init-action.js
generated
5
lib/init-action.js
generated
@@ -80933,6 +80933,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -80951,7 +80954,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
5
lib/setup-codeql-action.js
generated
5
lib/setup-codeql-action.js
generated
@@ -79282,6 +79282,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -79300,7 +79303,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
@@ -82153,6 +82153,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -82171,7 +82174,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
5
lib/upload-sarif-action.js
generated
5
lib/upload-sarif-action.js
generated
@@ -82198,6 +82198,9 @@ function isEnablementError(msg) {
|
||||
/Code Scanning is not enabled/
|
||||
].some((pattern) => pattern.test(msg));
|
||||
}
|
||||
function getFeatureEnablementError(message) {
|
||||
return `Please verify that the necessary features are enabled: ${message}`;
|
||||
}
|
||||
function wrapApiConfigurationError(e) {
|
||||
const httpError = asHTTPError(e);
|
||||
if (httpError !== void 0) {
|
||||
@@ -82216,7 +82219,7 @@ function wrapApiConfigurationError(e) {
|
||||
}
|
||||
if (isEnablementError(httpError.message)) {
|
||||
return new ConfigurationError(
|
||||
`Please verify that the necessary features are enabled: ${httpError.message}`
|
||||
getFeatureEnablementError(httpError.message)
|
||||
);
|
||||
}
|
||||
if (httpError.status === 429) {
|
||||
|
||||
Reference in New Issue
Block a user