kaneo (minimalist kanban) fork to experiment adding a tangled integration
github.com/usekaneo/kaneo
1import { and, eq } from "drizzle-orm";
2import db from "../../database";
3import { githubIntegrationTable } from "../../database/schema";
4
5async function getGithubIntegrationByRepositoryId(
6 repositoryOwner: string,
7 repositoryName: string,
8) {
9 const integration = await db.query.githubIntegrationTable.findFirst({
10 where: and(
11 eq(githubIntegrationTable.repositoryOwner, repositoryOwner),
12 eq(githubIntegrationTable.repositoryName, repositoryName),
13 ),
14 });
15
16 return integration;
17}
18
19export default getGithubIntegrationByRepositoryId;