MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / getInstallation

Function getInstallation

apps/web/src/lib/integrations/github-apps-service.ts:48–62  ·  view source on GitHub ↗
(owner: Owner)

Source from the content-addressed store, hash-verified

46export 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 */
65export async function listNativelyUninstallableIds(

Callers 2

updateModelFunction · 0.70

Calls 2

limitMethod · 0.65

Tested by

no test coverage detected