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

Function getGithubBranches

packages/server/src/utils/providers/github.ts:200–225  ·  view source on GitHub ↗
(
	input: z.infer<typeof apiFindGithubBranches>,
)

Source from the content-addressed store, hash-verified

198};
199
200export const getGithubBranches = async (
201 input: z.infer<typeof apiFindGithubBranches>,
202) => {
203 if (!input.githubId) {
204 return [];
205 }
206 const githubProvider = await findGithubById(input.githubId);
207
208 const octokit = new Octokit({
209 authStrategy: createAppAuth,
210 auth: {
211 appId: githubProvider.githubAppId,
212 privateKey: githubProvider.githubPrivateKey,
213 installationId: githubProvider.githubInstallationId,
214 },
215 });
216
217 const branches = (await octokit.paginate(octokit.rest.repos.listBranches, {
218 owner: input.owner,
219 repo: input.repo,
220 })) as unknown as Awaited<
221 ReturnType<typeof octokit.rest.repos.listBranches>
222 >["data"];
223
224 return branches;
225};

Callers 1

github.tsFile · 0.90

Calls 1

findGithubByIdFunction · 0.90

Tested by

no test coverage detected