fix: fetch up to 10000 commits instead of default 100

The backend defaults to returning only 100 commits. Update frontend
to explicitly request up to 10000 commits to show full history for
most repositories.
This commit is contained in:
Fusion
2026-05-19 13:12:48 +02:00
parent 9873a8186a
commit 834982d423
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -71,9 +71,14 @@ export interface CommitHistoryResponse {
export async function getRepositoryHistory(
projectId: string,
repoId: string,
branch?: string
branch?: string,
limit?: number
): Promise<CommitHistoryResponse> {
const params = branch ? `?branch=${encodeURIComponent(branch)}` : "";
const searchParams = new URLSearchParams();
if (branch) searchParams.set("branch", branch);
if (limit) searchParams.set("limit", String(limit));
const queryString = searchParams.toString();
const params = queryString ? `?${queryString}` : "";
const response = await apiClient.get(`/projects/${projectId}/repositories/${repoId}/history${params}`);
return response.data;
}
+1 -1
View File
@@ -18,7 +18,7 @@ export const GitHistoryPage = () => {
if (!projectId || !repoId) return;
setStatus("loading");
try {
const data = await getRepositoryHistory(projectId, repoId, selectedBranch || undefined);
const data = await getRepositoryHistory(projectId, repoId, selectedBranch || undefined, 10000);
setCommits(data.commits);
setBranches(data.branches);
if (data.branches.length > 0 && !selectedBranch) {