(workDir: string, env: NodeJS.ProcessEnv, ...args: string[])
| 61 | } |
| 62 | |
| 63 | export async function git(workDir: string, env: NodeJS.ProcessEnv, ...args: string[]): Promise<string> { |
| 64 | const { stdout } = await exec("git", args, { cwd: workDir, env, timeout: 30_000, maxBuffer: 2 * 1024 * 1024 }); |
| 65 | return stdout.trim(); |
| 66 | } |
| 67 | |
| 68 | export async function containsCommit(workDir: string, env: NodeJS.ProcessEnv, sha: string): Promise<boolean> { |
| 69 | return (await git(workDir, env, "rev-list", "refs/heads/main")).split("\n").includes(sha); |
no outgoing calls
no test coverage detected