Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

pullRequestChangeBreakdown.ts

8 lines415 Bytes

1import type { PullRequestChangeBreakdown } from "@t3tools/contracts";
2import { summarizeChangedFiles } from "@t3tools/shared/changedFileKind";
3import type { ProviderFileStats } from "@t3tools/source-control-core/server/PullRequestProvider";
4​
5export function toChangeBreakdown(stats: ProviderFileStats): PullRequestChangeBreakdown {
6 if (stats.truncated) return null;
7 return summarizeChangedFiles(stats.files);
8}