import { setCodeOwnerRequirement } from "~/fns/pull-review"; import { useAction } from "~/hooks/use-action"; import { Button } from "~/ui/Button"; type Props = { owner: string; repo: string; protectionId: string; enabled: boolean }; /** Toggles "require review from code owners" (CODEOWNERS) on a branch protection rule. */ export function CodeOwnerToggle({ owner, repo, protectionId, enabled }: Props) { const toggle = useAction(setCodeOwnerRequirement); return ( ); }