update action

This commit is contained in:
David Blass
2025-10-23 17:10:28 -04:00
parent 85731f8360
commit 1328894afd
6 changed files with 54 additions and 14 deletions
+30
View File
@@ -0,0 +1,30 @@
/**
* Centralized debug logging utility
* Controls debug behavior based on LOG_LEVEL environment variable
*/
import * as core from "@actions/core";
const isDebugEnabled = process.env.LOG_LEVEL === "debug";
const isGitHubActions = !!process.env.GITHUB_ACTIONS;
/**
* Check if debug logging is enabled
*/
export function isDebug(): boolean {
return isDebugEnabled;
}
/**
* Log debug message if debug is enabled
* Uses core.debug() in GitHub Actions, console.log() locally
*/
export function debugLog(message: string): void {
if (isDebugEnabled) {
if (isGitHubActions) {
core.debug(message);
} else {
console.log(`[DEBUG] ${message}`);
}
}
}
+2 -2
View File
@@ -43,8 +43,8 @@ export function setupTestRepo(options: SetupOptions): void {
*/
export function setupGitConfig(): void {
console.log("🔧 Setting up git configuration...");
execSync('git config --global user.email "action@pullfrog.ai"', { stdio: "inherit" });
execSync('git config --global user.name "Pullfrog Action"', { stdio: "inherit" });
execSync('git config user.email "action@pullfrog.ai"', { stdio: "inherit" });
execSync('git config user.name "Pullfrog Action"', { stdio: "inherit" });
}
/**