Use Actions logger in API client

This allows us to remove the `console-log-level` dependency.
This commit is contained in:
Henry Mercer
2025-10-28 12:15:03 +00:00
parent 20900ee769
commit 8b1e55d11e
15 changed files with 86 additions and 664 deletions

View File

@@ -1,7 +1,6 @@
import * as core from "@actions/core";
import * as githubUtils from "@actions/github/lib/utils";
import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";
import { getActionVersion, getRequiredInput } from "./actions-util";
import { Logger } from "./logging";
@@ -50,7 +49,10 @@ function createApiClientWithDetails(
githubUtils.getOctokitOptions(auth, {
baseUrl: apiDetails.apiURL,
userAgent: `CodeQL-Action/${getActionVersion()}`,
log: consoleLogLevel({ level: "debug" }),
log: {
...core,
warn: core.warning,
},
}),
);
}