johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import type { CommitView } from '#lib/lexicons/dev/knotless/defs.ts';
import { ago, plural, subject, whenCommitted } from '#lib/format.ts';
import Icon from '#lib/atoms/Icon.svelte';
import Sha from '#lib/atoms/Sha.svelte';
import Time from '#lib/atoms/Time.svelte';
import Committed from '#lib/molecules/Committed.svelte';
import Person from '#lib/molecules/Person.svelte';
/**
* Commits a pull's author added, in a run between what was said on it:
* each linked to its page in the repository whose pages are under `at`.
*/
let { author, commits, at }: { author: string; commits: CommitView[]; at: string } = $props();
const last = $derived(commits[commits.length - 1]);
</script>
<div class="pushed">
<div class="event">
<span class="dot soft"><Icon name="commit" /></span><span
><Person handle={author} />{` added ${plural(commits.length, 'commit', 'commits')} `}<Time
at={whenCommitted(last)}
show={(t) => ago(t, 'on ')}
/></span
>
</div>
<div class="box">
<ul class="list">
{#each commits as c (c.sha)}
<li>
<div class="grow">
<a class="title clip" href="{at}/commit/{c.sha}">{subject(c.message)}</a>
<div class="meta"><Committed commit={c} /></div>
</div>
<Sha sha={c.sha} href="{at}/commit/{c.sha}" />
</li>
{/each}
</ul>
</div>
</div>