Replace execSync with @actions/exec
Track: use-actions-exec-20260329
Overview
Replace the execSync call from node:child_process in src/index.ts with @actions/exec from the GitHub Actions toolkit. This aligns all command execution in the codebase to use the same library, improving consistency and leveraging the toolkit's built-in logging and error handling.
Scope
- Replace
execSync('git log -1 --pretty=format:%B') in getGitCommitMessage() with async @actions/exec.getExecOutput()
- Convert
getGitCommitMessage() from sync to async
- Remove
import { execSync } from 'node:child_process' from src/index.ts
- Update all callers of
getGitCommitMessage() to await the result
Success Criteria
Constraints
- No external behavior change — deployment output, PR comments, and error messages must remain identical
@actions/exec is already a dependency; no new dependencies required
Out of Scope
- Refactoring exec patterns in
src/vercel-cli.ts (already uses @actions/exec)
- Adding new features or changing command execution logic
- Modifying the Vercel CLI invocation patterns
Replace execSync with @actions/exec
Overview
Replace the
execSynccall fromnode:child_processinsrc/index.tswith@actions/execfrom the GitHub Actions toolkit. This aligns all command execution in the codebase to use the same library, improving consistency and leveraging the toolkit's built-in logging and error handling.Scope
execSync('git log -1 --pretty=format:%B')ingetGitCommitMessage()with async@actions/exec.getExecOutput()getGitCommitMessage()from sync to asyncimport { execSync } from 'node:child_process'fromsrc/index.tsgetGitCommitMessage()to await the resultSuccess Criteria
node:child_processimports remain in production source codegetGitCommitMessage()produces identical output as beforeConstraints
@actions/execis already a dependency; no new dependencies requiredOut of Scope
src/vercel-cli.ts(already uses@actions/exec)