mirror of
https://github.com/github/codeql-action.git
synced 2026-04-29 10:28:52 +00:00
Address feedback: cache git version, improve error handling, add telemetry
- Cache the git version to avoid recomputing on repeated calls - Refactor getGitVersion to getGitVersionOrThrow with detailed errors - Add getGitVersion that logs errors and handles caching - Add makeTelemetryDiagnostic helper to diagnostics.ts - Add logGitVersionTelemetry function to log git version telemetry - Call logGitVersionTelemetry in init-action.ts - Add resetCachedGitVersion for testing - Update tests to work with new function signatures and caching Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ import {
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, Features } from "./feature-flags";
|
||||
import { loadPropertiesFromApi } from "./feature-flags/properties";
|
||||
import { logGitVersionTelemetry } from "./git-utils";
|
||||
import {
|
||||
checkInstallPython311,
|
||||
checkPacksForOverlayCompatibility,
|
||||
@@ -433,6 +434,9 @@ async function run() {
|
||||
);
|
||||
}
|
||||
|
||||
// Log Git version telemetry
|
||||
await logGitVersionTelemetry(config, logger);
|
||||
|
||||
// Forward Go flags
|
||||
const goFlags = process.env["GOFLAGS"];
|
||||
if (goFlags) {
|
||||
|
||||
Reference in New Issue
Block a user