File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11import * as fs from "fs" ;
22import * as path from "path" ;
33
4+ import * as semver from "semver" ;
5+
46import * as actionsUtil from "./actions-util" ;
57import type { PullRequestBranches } from "./actions-util" ;
8+ import { getGitHubVersion } from "./api-client" ;
69import type { CodeQL } from "./codeql" ;
710import { Feature , FeatureEnablement } from "./feature-flags" ;
811import { Logger } from "./logging" ;
12+ import { GitHubVariant , parseGhesVersion } from "./util" ;
913
1014/**
1115 * Check if the action should perform diff-informed analysis.
@@ -37,6 +41,14 @@ export async function getDiffInformedAnalysisBranches(
3741 return undefined ;
3842 }
3943
44+ const gitHubVersion = await getGitHubVersion ( ) ;
45+ if (
46+ gitHubVersion . type === GitHubVariant . GHES &&
47+ semver . lt ( parseGhesVersion ( gitHubVersion . version ) , "3.19.0" )
48+ ) {
49+ return undefined ;
50+ }
51+
4052 const branches = actionsUtil . getPullRequestBranches ( ) ;
4153 if ( ! branches ) {
4254 logger . info (
You can’t perform that action at this time.
0 commit comments