{#each timeline as op} {#if op.type === "lifecycle"}
{#if op.state.status === "open"} {:else} {/if}
{#if op.state.status === "closed"} closed issue as {op.state.reason} {:else if op.state.status === "open"} reopened issue {/if}
{formatTimestamp(op.timestamp)}
{:else if op.type === "label" && op.previous && op.previous.type === op.type} {@const changed = itemDiff(op.previous?.labels ?? [], op.labels)} {#if changed.added.length || changed.removed.length}
{#if changed.added.length} added label{changed.added.length > 1 ? "s" : ""} {#each changed.added as label} {label} {/each} {/if} {#if changed.removed.length} removed label{changed.removed.length > 1 ? "s" : ""} {#each changed.removed as label} {label} {/each} {/if}
{formatTimestamp(op.timestamp)}
{/if} {:else if op.type === "assign" && op.previous && op.previous.type === op.type} {@const changed = itemDiff(op.previous?.assignees ?? [], op.assignees)} {#if changed.added.length || changed.removed.length}
{#if changed.added.length} assigned {#each changed.added as assignee} {#await invoke( "alias", { nid: publicKeyFromDid(assignee) }, ) then alias} {/await} {/each} {/if} {#if changed.removed.length} unassigned {#each changed.removed as assignee} {#await invoke( "alias", { nid: publicKeyFromDid(assignee) }, ) then alias} {/await} {/each} {/if}
{formatTimestamp(op.timestamp)}
{/if} {:else if op.type === "edit"} {#if op.previous && op.previous.type === op.type}
changed title {op.previous.title} -> {op.title}
{formatTimestamp(op.timestamp)}
{/if} {:else if op.type === "comment"} {#if op.id === activity[0].id}
opened issue
{formatTimestamp(op.timestamp)}
{:else}
{/if} {/if} {/each}