153 lines · 5.5 KB
import { all, first, run } from "../db";
import { embeddedScope } from "./ids";

/**
 * Kinds of rows that live in a scoped object but are looked up by id or credential hash alone. Add a kind here
 * (and register rows on insert) when moving a table whose rows are addressed without their repo or account.
 */
export type LocatorKind =
  | "issue"
  | "comment"
  | "review"
  | "review_comment"
  | "discussion"
  | "discussion_comment"
  | "release"
  | "release_asset"
  | "workflow_run"
  | "workflow_job"
  | "job_artifact"
  | "job_token"
  | "deploy_token"
  | "webhook"
  | "attachment"
  | "security_advisory"
  | "site"
  | "site_deployment"
  | "site_host"
  | "site_claim"
  | "session"
  | "access_token"
  | "access_token_id"
  | "auth_token"
  | "oauth_code"
  | "oauth_refresh"
  | "unsubscribe"
  | "passkey"
  | "runner"
  | "runner_token"
  | "runner_registration"
  | "org_invitation"