mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Use an undefined check rather than hasOwnProperty.
This commit is contained in:
Generated
+1
-1
@@ -33,7 +33,7 @@ exports.getApiClient = function (githubAuth, githubUrl, mode, allowLocalRun = fa
|
||||
const customOctokit = githubUtils.GitHub.plugin(retry.retry, (octokit, _) => {
|
||||
octokit.hook.after("request", (response, _) => {
|
||||
if (!hasBeenWarnedAboutVersion &&
|
||||
Object.prototype.hasOwnProperty.call(response.headers, GITHUB_ENTERPRISE_VERSION_HEADER)) {
|
||||
response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] !== undefined) {
|
||||
const installedVersion = response.headers[GITHUB_ENTERPRISE_VERSION_HEADER];
|
||||
const disallowedAPIVersionReason = apiVersionInRange(installedVersion, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion);
|
||||
const logger = mode === "actions"
|
||||
|
||||
Reference in New Issue
Block a user