{#snippet timestamp()} {formatTimestamp(op.timestamp)} {/snippet} {#if op.type === "opened"}
{#if !hideAuthor}{/if} opened this issue {@render timestamp()}
{:else if op.type === "lifecycle"}
{#if !hideAuthor}{/if} {#if op.state.status === "closed"} closed this issue as {op.state.reason} {:else} reopened this issue {/if} {@render timestamp()}
{:else if op.type === "label"}
{#if !hideAuthor}{/if} {#if op.previous && op.previous.type === op.type} {@const changed = itemDiff(op.previous?.labels ?? [], op.labels)} {#if changed.added.length} added {pluralize("label", changed.added.length)} {#each changed.added as label} {@render timestamp()}
{:else if op.type === "assign"}
{#if !hideAuthor}{/if} {#if op.previous && op.previous.type === op.type} {@const changed = itemDiff( op.previous?.assignees ?? [], op.assignees, )} {#if changed.added.length} assigned {#each changed.added as assignee} {/each} {/if} {#if changed.removed.length} unassigned {#each changed.removed as assignee} {/each} {/if} {:else} assigned {#each op.assignees as assignee} {/each} {/if} {@render timestamp()}
{:else if op.type === "edit"} {#if op.previous && op.previous.type === op.type}
{#if !hideAuthor}{/if} changed the title from “{op.previous.title}” to “{op.title}” {@render timestamp()}
{/if} {/if}