mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 09:18:47 +00:00
Avoid requesting features in CCR
This commit is contained in:
Generated
+12
-1
@@ -103247,6 +103247,10 @@ function isSelfHostedRunner() {
|
||||
function isDynamicWorkflow() {
|
||||
return getWorkflowEventName() === "dynamic";
|
||||
}
|
||||
var CCR_KEY_PREFIX = "dynamic/copilot-pull-request-reviewer";
|
||||
function isCCR() {
|
||||
return process.env["CODEQL_ACTION_ANALYSIS_KEY" /* ANALYSIS_KEY */]?.startsWith(CCR_KEY_PREFIX) || false;
|
||||
}
|
||||
function prettyPrintInvocation(cmd, args) {
|
||||
return [cmd, ...args].map((x) => x.includes(" ") ? `'${x}'` : x).join(" ");
|
||||
}
|
||||
@@ -104246,7 +104250,14 @@ var GitHubFeatureFlags = class {
|
||||
async loadApiResponse() {
|
||||
if (!supportsFeatureFlags(this.gitHubVersion.type)) {
|
||||
this.logger.debug(
|
||||
"Not running against github.com. Disabling all toggleable features."
|
||||
"Not running against github.com. Using default values for all features."
|
||||
);
|
||||
this.hasAccessedRemoteFeatureFlags = false;
|
||||
return {};
|
||||
}
|
||||
if (isCCR()) {
|
||||
this.logger.debug(
|
||||
"Feature flags are not supported in Copilot Code Review. Using default values for all features."
|
||||
);
|
||||
this.hasAccessedRemoteFeatureFlags = false;
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user