MCPcopy Index your code
hub / github.com/Dokploy/dokploy / getGithubRepositories

Function getGithubRepositories

packages/server/src/utils/providers/github.ts:175–198  ·  view source on GitHub ↗
(githubId?: string)

Source from the content-addressed store, hash-verified

173};
174
175export const getGithubRepositories = async (githubId?: string) => {
176 if (!githubId) {
177 return [];
178 }
179
180 const githubProvider = await findGithubById(githubId);
181
182 const octokit = new Octokit({
183 authStrategy: createAppAuth,
184 auth: {
185 appId: githubProvider.githubAppId,
186 privateKey: githubProvider.githubPrivateKey,
187 installationId: githubProvider.githubInstallationId,
188 },
189 });
190
191 const repositories = (await octokit.paginate(
192 octokit.rest.apps.listReposAccessibleToInstallation,
193 )) as unknown as Awaited<
194 ReturnType<typeof octokit.rest.apps.listReposAccessibleToInstallation>
195 >["data"]["repositories"];
196
197 return repositories;
198};
199
200export const getGithubBranches = async (
201 input: z.infer<typeof apiFindGithubBranches>,

Callers 1

github.tsFile · 0.90

Calls 1

findGithubByIdFunction · 0.90

Tested by

no test coverage detected