(
cwd: string,
args: string[],
options: { env?: NodeJS.ProcessEnv; maxBuffer?: number } = {},
)
| 17 | } |
| 18 | |
| 19 | export async function git( |
| 20 | cwd: string, |
| 21 | args: string[], |
| 22 | options: { env?: NodeJS.ProcessEnv; maxBuffer?: number } = {}, |
| 23 | ): Promise<GitCommandResult> { |
| 24 | const { stdout, stderr } = await execFileAsync("git", args, { |
| 25 | cwd, |
| 26 | env: options.env ? { ...process.env, ...options.env } : process.env, |
| 27 | maxBuffer: options.maxBuffer ?? 10 * 1024 * 1024, |
| 28 | }); |
| 29 | |
| 30 | return { stdout, stderr }; |
| 31 | } |
| 32 | |
| 33 | export async function getGitEligibility(cwd: string): Promise<GitEligibility> { |
| 34 | try { |
no outgoing calls
no test coverage detected