MCPcopy Create free account
hub / github.com/cloudflare/computer / formatLogFull

Function formatLogFull

packages/computer/src/git/cli.ts:812–826  ·  view source on GitHub ↗
(commits: CommitView[])

Source from the content-addressed store, hash-verified

810}
811
812function formatLogFull(commits: CommitView[]): string {
813 if (commits.length === 0) return "";
814 const blocks: string[] = [];
815 for (const c of commits) {
816 const lines = [
817 `commit ${c.oid}`,
818 `Author: ${c.author.name} <${c.author.email}>`,
819 `Date: ${formatGitTimestamp(c.author.timestamp, c.author.timezoneOffset)}`,
820 "",
821 ...c.message.split("\n").map((l) => ` ${l}`),
822 ];
823 blocks.push(lines.join("\n"));
824 }
825 return `${blocks.join("\n\n")}\n`;
826}
827
828function formatGitTimestamp(timestamp: number, timezoneOffset: number): string {
829 // isomorphic-git stores timezoneOffset as minutes east of UTC,

Callers 2

runLogFunction · 0.85
runShowFunction · 0.85

Calls 2

formatGitTimestampFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected