Avoid requesting features in CCR

This commit is contained in:
Henry Mercer
2026-02-12 16:37:39 +00:00
parent 43b46a19be
commit 876cecb383
9 changed files with 126 additions and 22 deletions
+12 -1
View File
@@ -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 {};