( projectId: string, rev: string, )
| 75 | } |
| 76 | |
| 77 | export async function getProjectCommitEntry( |
| 78 | projectId: string, |
| 79 | rev: string, |
| 80 | ): Promise<ProjectCommitEntry | null> { |
| 81 | const resolvedRev = await resolveCommitRevision(projectId, rev) |
| 82 | if (!resolvedRev) { |
| 83 | return null |
| 84 | } |
| 85 | |
| 86 | const { stdout } = await runGitWithOptions( |
| 87 | projectId, |
| 88 | ['show', '--no-patch', '--decorate=short', `--format=${COMMIT_PRETTY_FORMAT}`, resolvedRev], |
| 89 | { |
| 90 | timeout: 10_000, |
| 91 | maxBuffer: 1024 * 512, |
| 92 | }, |
| 93 | ) |
| 94 | |
| 95 | return parseCommitEntries(stdout)[0] ?? null |
| 96 | } |
| 97 | |
| 98 | export async function listProjectCommits( |
| 99 | projectId: string, |
no test coverage detected