Skip to content

Commit 3920e2d

Browse files
authored
Merge pull request #1313 from github/criemen/ghes-31-deprecation
GHES 3.1 has been deprecated end of June 2022.
2 parents 96c8872 + f3a27d6 commit 3920e2d

9 files changed

+4
-70
lines changed

lib/actions-util.js

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.test.js

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions-util.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
getCodeQLDatabasePath,
1717
getRequiredEnvParam,
1818
GITHUB_DOTCOM_URL,
19-
isGitHubGhesVersionBelow,
2019
isHTTPError,
2120
isInTestMode,
2221
UserError,
@@ -749,14 +748,6 @@ const INCOMPATIBLE_MSG =
749748
export async function sendStatusReport<S extends StatusReportBase>(
750749
statusReport: S
751750
): Promise<boolean> {
752-
const gitHubVersion = await api.getGitHubVersionActionsOnly();
753-
if (isGitHubGhesVersionBelow(gitHubVersion, "3.2.0")) {
754-
// GHES 3.1 and earlier versions reject unexpected properties, which means
755-
// that they will reject status reports with newly added properties.
756-
// Inhibiting status reporting for GHES < 3.2 avoids such failures.
757-
return true;
758-
}
759-
760751
const statusReportJSON = JSON.stringify(statusReport);
761752
core.debug(`Sending status report: ${statusReportJSON}`);
762753
// If in test mode we don't want to upload the results

src/util.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -365,33 +365,6 @@ for (const [packs, expectedStatus] of ML_POWERED_JS_STATUS_TESTS) {
365365
});
366366
}
367367

368-
test("isGitHubGhesVersionBelow", async (t) => {
369-
t.falsy(
370-
util.isGitHubGhesVersionBelow({ type: util.GitHubVariant.DOTCOM }, "3.2.0")
371-
);
372-
t.falsy(
373-
util.isGitHubGhesVersionBelow({ type: util.GitHubVariant.GHAE }, "3.2.0")
374-
);
375-
t.falsy(
376-
util.isGitHubGhesVersionBelow(
377-
{ type: util.GitHubVariant.GHES, version: "3.3.0" },
378-
"3.2.0"
379-
)
380-
);
381-
t.falsy(
382-
util.isGitHubGhesVersionBelow(
383-
{ type: util.GitHubVariant.GHES, version: "3.2.0" },
384-
"3.2.0"
385-
)
386-
);
387-
t.true(
388-
util.isGitHubGhesVersionBelow(
389-
{ type: util.GitHubVariant.GHES, version: "3.1.2" },
390-
"3.2.0"
391-
)
392-
);
393-
});
394-
395368
function formatGitHubVersion(version: util.GitHubVersion): string {
396369
switch (version.type) {
397370
case util.GitHubVariant.DOTCOM:

src/util.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -605,16 +605,6 @@ export function isHTTPError(arg: any): arg is HTTPError {
605605
return arg?.status !== undefined && Number.isInteger(arg.status);
606606
}
607607

608-
export function isGitHubGhesVersionBelow(
609-
gitHubVersion: GitHubVersion,
610-
expectedVersion: string
611-
): boolean {
612-
return (
613-
gitHubVersion.type === GitHubVariant.GHES &&
614-
semver.lt(gitHubVersion.version, expectedVersion)
615-
);
616-
}
617-
618608
let cachedCodeQlVersion: undefined | string = undefined;
619609

620610
export function cacheCodeQlVersion(version: string): void {

0 commit comments

Comments
 (0)