(owner: Owner)
| 46 | export async function listIntegrations(owner: Owner) { |
| 47 | const ownershipCondition = ownerCondition(owner); |
| 48 | |
| 49 | const integrations = await db |
| 50 | .select() |
| 51 | .from(platform_integrations) |
| 52 | .where(and(ownershipCondition, eq(platform_integrations.platform, 'github'))) |
| 53 | .orderBy(asc(platform_integrations.created_at), asc(platform_integrations.id)); |
| 54 | |
| 55 | return integrations; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Which of these connections `uninstallApp` can remove upstream, judged by the |
| 60 | * same rule `uninstallExclusiveGitHubInstallation` applies: a `workflow`-role |
| 61 | * association whose installation has no other locally connected association. |
| 62 | * The hub reads this instead of guessing from the list alone, so it never |
| 63 | * offers a native Disconnect the server would refuse. |
| 64 | */ |
| 65 | export async function listNativelyUninstallableIds( |
no test coverage detected