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";
2222import { FeatureEnablement , Feature } from "./feature-flags" ;
2323import { isScannedLanguage , Language } from "./languages" ;
2424import { Logger , withGroupAsync } from "./logging" ;
25- import { getRepositoryNwo } from "./repository" ;
25+ import { getRepositoryNwoFromEnv } from "./repository" ;
2626import { DatabaseCreationTimings , EventReport } from "./status-report" ;
2727import { ToolsFeature } from "./tools-features" ;
2828import { endTracingForCluster } from "./tracer-config" ;
@@ -390,7 +390,12 @@ async function getFileDiffsWithBasehead(
390390 branches : PullRequestBranches ,
391391 logger : Logger ,
392392) : 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+ ) ;
394399 const basehead = `${ branches . base } ...${ branches . head } ` ;
395400 try {
396401 const response = await getApiClient ( ) . rest . repos . compareCommitsWithBasehead (
You can’t perform that action at this time.
0 commit comments