show recent commits in launcher source page
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-03 17:00:34 +09:00
parent 51f06b3b84
commit c6e99b1efc
2 changed files with 163 additions and 0 deletions
+38
View File
@@ -54,6 +54,34 @@ export type LauncherSource = {
};
};
export type GiteaCommit = {
sha: string;
commit?: {
message?: string;
author?: {
name?: string;
date?: string;
};
committer?: {
name?: string;
date?: string;
};
};
author?: {
login?: string;
username?: string;
full_name?: string;
name?: string;
} | null;
committer?: {
login?: string;
username?: string;
full_name?: string;
name?: string;
} | null;
created?: string;
};
export type LauncherAppLink = {
id: string;
appId: string;
@@ -151,6 +179,16 @@ export function listStudioRepos(limit = 50) {
.then((result) => result.repos);
}
export function listGiteaCommits(owner: string, repo: string, branch = 'develop', limit = 5) {
const params = new URLSearchParams({
sha: branch,
limit: String(limit)
});
return apiRequest<{ commits: GiteaCommit[] }>(
`/gitea/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/commits?${params.toString()}`
).then((result) => result.commits);
}
export function listLauncherBuildJobs() {
return apiRequest<LauncherBuildJob[]>('/launcher/builds');
}