(owner: Owner)
| 244 | |
| 245 | export async function getInstallation( |
| 246 | owner: Owner, |
| 247 | database: typeof db | DrizzleTransaction = db |
| 248 | ): Promise<PlatformIntegration | null> { |
| 249 | const [integration] = await database |
| 250 | .select() |
| 251 | .from(platform_integrations) |
| 252 | .where( |
| 253 | and(...getOwnershipConditions(owner), eq(platform_integrations.platform, PLATFORM.LINEAR)) |
| 254 | ) |
| 255 | .limit(1); |
| 256 | |
| 257 | return integration || null; |
| 258 | } |
| 259 |
no test coverage detected