contributionsOn

tcmts.cli.releases.contributionsOn · #2te6d2px · term · runs on the server

uses tcmts.cli.sync.openRemote, which uses process

The merged contributions a remote knows (where a release's are, when it's made off the server); none if it can't say.

import type { Codebase } from "#codebase/tcmts/cli/codebase";
import { openRemote } from "#codebase/tcmts/cli/sync";
import type { Contribution } from "#codebase/tcmts/store";

export async function contributionsOn(cb: Codebase, remote: string | undefined): Promise<Contribution[]> {
  const spec = remote ?? (cb.store.getSetting("remote.origin") ? "origin" : undefined);
  if (!spec) return [];
  try {
    return await openRemote(cb, spec).remote.contributions(true);
  } catch (e) {
    if (remote) throw e;
    return [];
  }
}

uses

used by