Skip to content
Français

WorkspaceCommitsEvent

import type { WorkspaceCommitsEvent } from "@elie-laloum/outpost";

The fields below cover all variants; the signature specifies their allowed combinations.

  • kindRequired
    "workspace-commits"
    Event discriminator for recorded workspace commits.
  • baselineVariant-dependent
    RecordedRevision | RecordedRevision | undefined
    Commit and tree the sandbox dispatch started from; absent when even the baseline could not be read.
  • commitsVariant-dependent
    readonly RecordedCommit[]
    Linear commits created by the dispatch, oldest first.
  • unavailableVariant-dependent
    string
    Reason the commits were not recorded: non-linear or rewritten history, size limit, non-UTF-8 encoding, a patch that does not reproduce its tree, or a Git failure.
export type WorkspaceCommitsEvent =
  | {
      readonly kind: "workspace-commits";
      readonly baseline: RecordedRevision;
      readonly commits: readonly RecordedCommit[];
    }
  | {
      readonly kind: "workspace-commits";
      readonly baseline?: RecordedRevision;
      readonly unavailable: string;
    };