feat(giteaclient): add deleteRepo method to delete a repository via Gitea API

This commit is contained in:
2026-02-28 11:13:36 +00:00
parent a34b05c55c
commit 5423039f89
3 changed files with 18 additions and 1 deletions

View File

@@ -258,4 +258,15 @@ export class GiteaClient {
public async cancelAction(ownerRepo: string, runId: number): Promise<void> {
await this.request('POST', `/api/v1/repos/${ownerRepo}/actions/runs/${runId}/cancel`);
}
// ---------------------------------------------------------------------------
// Repository Deletion
// ---------------------------------------------------------------------------
public async deleteRepo(owner: string, repo: string): Promise<void> {
await this.request(
'DELETE',
`/api/v1/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`,
);
}
}