Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

380 B
Raw Blame
import type { ImportedPerson } from "../types.js";
import type { LinearUser } from "./client.js";

export function toPerson(
  user: LinearUser | null | undefined,
): ImportedPerson | undefined {
  const name = user?.name?.trim();
  const email = user?.email?.trim();
  if (!name && !email) return undefined;
  return { ...(name ? { name } : {}), ...(email ? { email } : {}) };
}