File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ import * as path from "path";
33
44import * as actionsUtil from "./actions-util" ;
55import type { PullRequestBranches } from "./actions-util" ;
6+ import { getGitHubVersion } from "./api-client" ;
67import type { CodeQL } from "./codeql" ;
78import { Feature , FeatureEnablement } from "./feature-flags" ;
89import { Logger } from "./logging" ;
10+ import { GitHubVariant , satisfiesGHESVersion } from "./util" ;
911
1012/**
1113 * Check if the action should perform diff-informed analysis.
@@ -37,6 +39,14 @@ export async function getDiffInformedAnalysisBranches(
3739 return undefined ;
3840 }
3941
42+ const gitHubVersion = await getGitHubVersion ( ) ;
43+ if (
44+ gitHubVersion . type === GitHubVariant . GHES &&
45+ satisfiesGHESVersion ( gitHubVersion . version , "<3.19" , true )
46+ ) {
47+ return undefined ;
48+ }
49+
4050 const branches = actionsUtil . getPullRequestBranches ( ) ;
4151 if ( ! branches ) {
4252 logger . info (
You can’t perform that action at this time.
0 commit comments