contributedBy

tcmts.cli.contributions.contributedBy · #djs2ny3a · function · runs anywhere

Who a history entry (its command and message, as entryText keeps them) credits for the contribution it merged, if it's a merge that says so.

export function contributedBy(entry: string): { handle: string; did: string } | undefined {
  const m = /^Contributed-by: @(\S+) (did:[a-z]+:[A-Za-z0-9._:%-]+)$/m.exec(entry);
  return m ? { handle: m[1]!, did: m[2]! } : undefined;
}

used by