paginate launcher source and build history
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-07 09:29:44 +09:00
parent 56ff75cc5a
commit ff23415818
2 changed files with 71 additions and 13 deletions
+17
View File
@@ -221,6 +221,23 @@ export function listGiteaCommits(
).then((result) => result.commits);
}
export function listGiteaCommitsPage(
owner: string,
repo: string,
branch = 'develop',
options: { page: number; limit: number; since?: string }
) {
const params = new URLSearchParams({
sha: branch,
page: String(options.page),
limit: String(options.limit)
});
if (options.since) params.set('since', options.since);
return apiRequest<{ commits: GiteaCommit[]; total: number | null; page: number; limit: number }>(
`/gitea/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/commits?${params.toString()}`
);
}
export function getGiteaCommitDiff(owner: string, repo: string, sha: string) {
return apiRequest<{ diff: string }>(
`/gitea/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/commits/${encodeURIComponent(sha)}/diff`