MCPcopy Create free account
hub / github.com/lightdash/lightdash / listInstallations

Function listInstallations

scripts/dev-github-reconcile.cjs:80–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80async function listInstallations() {
81 // The shared dev App has 100+ installations; the API defaults to 30 per page,
82 // so without pagination YOUR account can fall beyond page 1 and look "not installed".
83 const all = [];
84 for (let page = 1; ; page += 1) {
85 const res = await gh(`/app/installations?per_page=100&page=${page}`);
86 if (!res.ok) throw new Error(`GET /app/installations -> ${res.status}`);
87 const batch = await res.json();
88 if (!Array.isArray(batch) || batch.length === 0) break;
89 all.push(...batch);
90 if (batch.length < 100) break;
91 }
92 return all;
93}
94async function pickInstallation() {
95 const list = await listInstallations();
96 if (!list.length) throw new Error('App has no installations — install the dev GitHub App on your account first');

Callers 3

pickInstallationFunction · 0.85
stepInstallationFunction · 0.85

Calls 2

ghFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected