Skip to content

Commit f59338d

Browse files
committed
Remove isCCR
1 parent cb4e075 commit f59338d

15 files changed

+20
-124
lines changed

lib/analyze-action.js

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions-util.test.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import {
55
fixCodeQualityCategory,
66
getPullRequestBranches,
77
isAnalyzingPullRequest,
8-
isCCR,
98
isDefaultSetup,
109
isDynamicWorkflow,
1110
} from "./actions-util";
1211
import { computeAutomationID } from "./api-client";
1312
import { EnvVar } from "./environment";
1413
import { getRunnerLogger } from "./logging";
15-
import { mockCCR, setupTests } from "./testing-utils";
14+
import { setupTests } from "./testing-utils";
1615
import { initializeEnvironment } from "./util";
1716

1817
setupTests(test);
@@ -257,16 +256,8 @@ test("isDynamicWorkflow() returns true if event name is `dynamic`", (t) => {
257256
t.false(isDynamicWorkflow());
258257
});
259258

260-
test("isCCR() returns true when expected", (t) => {
261-
mockCCR();
262-
263-
t.assert(isCCR());
264-
t.false(isDefaultSetup());
265-
});
266-
267259
test("isDefaultSetup() returns true when expected", (t) => {
268260
process.env.GITHUB_EVENT_NAME = "dynamic";
269261
process.env[EnvVar.ANALYSIS_KEY] = "dynamic/github-code-scanning";
270262
t.assert(isDefaultSetup());
271-
t.false(isCCR());
272263
});

src/actions-util.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import * as io from "@actions/io";
88
import { JSONSchemaForNPMPackageJsonFiles } from "@schemastore/package";
99

1010
import type { Config } from "./config-utils";
11-
import { EnvVar } from "./environment";
1211
import { Logger } from "./logging";
1312
import {
1413
doesDirectoryExist,
@@ -255,15 +254,7 @@ export function isDynamicWorkflow(): boolean {
255254

256255
/** Determines whether we are running in default setup. */
257256
export function isDefaultSetup(): boolean {
258-
return isDynamicWorkflow() && !isCCR();
259-
}
260-
261-
/* The analysis key prefix used for CCR. */
262-
const CCR_KEY_PREFIX = "dynamic/copilot-pull-request-reviewer";
263-
264-
/** Determines whether we are running in CCR. */
265-
export function isCCR(): boolean {
266-
return process.env[EnvVar.ANALYSIS_KEY]?.startsWith(CCR_KEY_PREFIX) || false;
257+
return isDynamicWorkflow();
267258
}
268259

269260
export function prettyPrintInvocation(cmd: string, args: string[]): string {

0 commit comments

Comments
 (0)