authorFor

tcmts.cli.sync.authorFor · #rtqgfqxu · term · runs anywhere

Who signs what a caller writes: a contributor is their handle, whatever they say; the maintainer is who they say.

import type { Caller } from "#codebase/tcmts/cli/sync";

export function authorFor(caller: Caller, given: unknown): string {
  return caller.role === "contributor" ? `@${caller.handle}` : String(given ?? "");
}

uses

used by