File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import { EnvVar } from "./environment";
22
22
import { FeatureEnablement , Feature } from "./feature-flags" ;
23
23
import { isScannedLanguage , Language } from "./languages" ;
24
24
import { Logger , withGroupAsync } from "./logging" ;
25
- import { getRepositoryNwo } from "./repository" ;
25
+ import { getRepositoryNwoFromEnv } from "./repository" ;
26
26
import { DatabaseCreationTimings , EventReport } from "./status-report" ;
27
27
import { ToolsFeature } from "./tools-features" ;
28
28
import { endTracingForCluster } from "./tracer-config" ;
@@ -390,7 +390,12 @@ async function getFileDiffsWithBasehead(
390
390
branches : PullRequestBranches ,
391
391
logger : Logger ,
392
392
) : Promise < FileDiff [ ] | undefined > {
393
- const repositoryNwo = getRepositoryNwo ( ) ;
393
+ // Check CODE_SCANNING_REPOSITORY first. If it is empty or not set, fall back
394
+ // to GITHUB_REPOSITORY.
395
+ const repositoryNwo = getRepositoryNwoFromEnv (
396
+ "CODE_SCANNING_REPOSITORY" ,
397
+ "GITHUB_REPOSITORY" ,
398
+ ) ;
394
399
const basehead = `${ branches . base } ...${ branches . head } ` ;
395
400
try {
396
401
const response = await getApiClient ( ) . rest . repos . compareCommitsWithBasehead (
You can’t perform that action at this time.
0 commit comments