import { Commit } from "../../../../git/commit"; import { LogCommit } from "api"; export async function commitMap(commit: Commit): Promise { const stats = await commit.stats(); return { id: commit.id, author: { name: commit.author().name, email: commit.author().email, fingerprint: await commit.author().fingerprint().catch(() => null) }, isSigned: await commit.isSigned(), message: commit.message, date: commit.date, insertions: stats.insertions, deletions: stats.deletions, files_changed: stats.files_changed }; }