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.

555 B
Raw Blame
import { and, eq } from "drizzle-orm";
import db from "../../database";
import { githubIntegrationTable } from "../../database/schema";

async function getGithubIntegrationByRepositoryId(
  repositoryOwner: string,
  repositoryName: string,
) {
  const integration = await db.query.githubIntegrationTable.findFirst({
    where: and(
      eq(githubIntegrationTable.repositoryOwner, repositoryOwner),
      eq(githubIntegrationTable.repositoryName, repositoryName),
    ),
  });

  return integration;
}

export default getGithubIntegrationByRepositoryId;