mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(#93): extract all branches from repository
This commit is contained in:
@@ -152,11 +152,18 @@ export const adminRouter = createTRPCRouter({
|
|||||||
installationId: admin.githubInstallationId,
|
installationId: admin.githubInstallationId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const branches = await octokit.rest.repos.listBranches({
|
|
||||||
owner: input.owner,
|
const branches = (await octokit.paginate(
|
||||||
repo: input.repo,
|
octokit.rest.repos.listBranches,
|
||||||
});
|
{
|
||||||
return branches.data;
|
owner: input.owner,
|
||||||
|
repo: input.repo,
|
||||||
|
},
|
||||||
|
)) as unknown as Awaited<
|
||||||
|
ReturnType<typeof octokit.rest.repos.listBranches>
|
||||||
|
>["data"];
|
||||||
|
|
||||||
|
return branches;
|
||||||
}),
|
}),
|
||||||
haveGithubConfigured: protectedProcedure.query(async () => {
|
haveGithubConfigured: protectedProcedure.query(async () => {
|
||||||
const adminResponse = await findAdmin();
|
const adminResponse = await findAdmin();
|
||||||
|
|||||||
Reference in New Issue
Block a user