This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user