feat: add branch listing API function

This commit is contained in:
2026-05-24 09:20:31 +00:00
parent 10a5c29702
commit c5f117e5b1
+21
View File
@@ -64,6 +64,27 @@ export async function updateRepositorySshKey(
return response.data;
}
export interface Branch {
name: string;
is_default: boolean;
last_commit: string | null;
}
export interface BranchesResponse {
branches: Branch[];
default_branch: string;
}
export async function listRepositoryBranches(
projectId: string,
repoId: string
): Promise<BranchesResponse> {
const response = await apiClient.get(
`/projects/${projectId}/repositories/${repoId}/branches`
);
return response.data;
}
export interface CommitHistoryEntry {
hash: string;
short_hash: string;