-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore compatibility with GHES 3.1 #978
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions. Also did you mean to open this from your main
branch?
CHANGELOG.md
Outdated
@@ -2,7 +2,7 @@ | |||
|
|||
## [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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
@@ -695,6 +694,10 @@ export async function createStatusReportBase( | |||
if (matrix) { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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_ARCH
environment variable exists before accessingMerge / deployment checklist