(targetDir: string, sha: string, parents: string[])
| 147 | } |
| 148 | |
| 149 | export function changedFilesForCommit(targetDir: string, sha: string, parents: string[]): string[] { |
| 150 | const args = parents[0] |
| 151 | ? ["diff", "--name-only", `${parents[0]}..${sha}`] |
| 152 | : ["diff-tree", "--root", "--no-commit-id", "--name-only", "-r", sha]; |
| 153 | return run("git", args, { cwd: targetDir }) |
| 154 | .split("\n") |
| 155 | .map((file) => file.trim()) |
| 156 | .filter(Boolean); |
| 157 | } |
| 158 | |
| 159 | export function skippedNonCodeReport(options: { |
| 160 | targetRepo: string; |
no test coverage detected