removeServerUser
Remove a contributor: their token stops working. Whether there was one.
import type { Codebase } from "#codebase/tcmts/cli/codebase"; import { serverUsers, USERS_SETTING } from "#codebase/tcmts/cli/sync"; export function removeServerUser(cb: Codebase, handle: string): boolean { const h = handle.replace(/^@/, ""); const users = serverUsers(cb); const left = users.filter((u) => u.handle !== h); cb.store.setSetting(USERS_SETTING, JSON.stringify(left)); return left.length < users.length; }