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";
3
3
4
4
import * as actionsUtil from "./actions-util" ;
5
5
import type { PullRequestBranches } from "./actions-util" ;
6
+ import { getGitHubVersion } from "./api-client" ;
6
7
import type { CodeQL } from "./codeql" ;
7
8
import { Feature , FeatureEnablement } from "./feature-flags" ;
8
9
import { Logger } from "./logging" ;
10
+ import { GitHubVariant , satisfiesGHESVersion } from "./util" ;
9
11
10
12
/**
11
13
* Check if the action should perform diff-informed analysis.
@@ -37,6 +39,14 @@ export async function getDiffInformedAnalysisBranches(
37
39
return undefined ;
38
40
}
39
41
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
+
40
50
const branches = actionsUtil . getPullRequestBranches ( ) ;
41
51
if ( ! branches ) {
42
52
logger . info (
You can’t perform that action at this time.
0 commit comments