Restore compatibility with GHES 3.1#978
Restore compatibility with GHES 3.1#978cklin merged 3 commits intogithub:mainfrom cklin:restore-ghes-compatibility
Conversation
adityasharad
left a comment
There was a problem hiding this comment.
Minor suggestions. Also did you mean to open this from your main branch?
CHANGELOG.md
Outdated
| ## [UNRELEASED] | ||
|
|
||
| No user facing changes. | ||
| - Fix a bug where actions would fail when used with GHES 3.3 or earlier. [#978](https://github.com/github/codeql-action/pull/978) |
There was a problem hiding this comment.
I think there are two bugs fixed here: one on 3.3 and earlier due to RUNNER_ARCH, and one on 3.1 and earlier due to unexpected telemetry fields. Could you expand this a little bit so that users know which errors will go away by updating?
| statusReport.matrix_vars = matrix; | ||
| } | ||
| if ("RUNNER_ARCH" in process.env) { | ||
| // RUNNER_ARCH is available only in GHES 3.4 and later |
There was a problem hiding this comment.
Minor: worth commenting that the server will filter out unknown/unfamiliar values.
src/api-client.ts
Outdated
| * | ||
| * @returns GitHub version | ||
| */ | ||
| export async function getGitHubVersion(): Promise<GitHubVersion> { |
There was a problem hiding this comment.
Minor: How about something like getGitHubVersionActionsOnly?
src/api-client.ts
Outdated
| * Report the GitHub server version. This is a wrapper around | ||
| * util.getGitHubVersion() that automatically supplies GitHub API details using | ||
| * GitHub Action inputs. If you need to get the GitHub server version from the | ||
| * action runner, please call util.getGitHubVersion() instead. |
There was a problem hiding this comment.
| * action runner, please call util.getGitHubVersion() instead. | |
| * Runner, please call util.getGitHubVersion() instead. |
Good catch! And no, it was a screw-up on my part. I don't think there is a way to switch the source branch of a PR, so I will just have to learn my lesson and put the |
|
@adityasharad |
This PR fixes a few problems related to GHES compatibility.
RUNNER_ARCHenvironment variable exists before accessingMerge / deployment checklist