Skip to content

Commit c7d0b92

Browse files
committed
Drop isDynamic check from isCCR
The analysis key already tells us this under normal conditions
1 parent 055e6b6 commit c7d0b92

File tree

6 files changed

+14
-22
lines changed

6 files changed

+14
-22
lines changed

lib/analyze-action.js

Lines changed: 2 additions & 3 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: 2 additions & 3 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 & 3 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: 2 additions & 3 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: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions-util.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,12 @@ export function isDefaultSetup(): boolean {
258258
return isDynamicWorkflow() && !isCCR();
259259
}
260260

261+
/* The analysis key prefix used for CCR. */
262+
const CCR_KEY_PREFIX = "dynamic/copilot-pull-request-reviewer";
263+
261264
/** Determines whether we are running in CCR. */
262265
export function isCCR(): boolean {
263-
return (
264-
(isDynamicWorkflow() &&
265-
process.env[EnvVar.ANALYSIS_KEY]?.startsWith(
266-
"dynamic/copilot-pull-request-reviewer",
267-
)) ||
268-
false
269-
);
266+
return process.env[EnvVar.ANALYSIS_KEY]?.startsWith(CCR_KEY_PREFIX) || false;
270267
}
271268

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

0 commit comments

Comments
 (0)