--- import './wire.css'; interface Props { repo: string; sha: string; author: string; subject: string; date?: string; comment?: string; } const { repo, sha, author, subject, date, comment } = Astro.props; const url = `https://github.com/${repo}/commit/${sha}`; const avatar = `https://github.com/${author}.png?size=48`; const shortSha = sha.slice(0, 8); const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; function formatDate(d?: string) { if (!d) return ''; const m = d.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/); // MM-DD-YYYY if (m) return `${months[Number(m[1]) - 1]} ${Number(m[2])}, ${m[3]}`; return d; } const when = formatDate(date); ---
{`@${author}`} {shortSha} {subject} @{author}{when && ` · ${when}`} {comment &&

{comment}

}