feat(gitea): add domain model classes, helpers, and refactor GiteaClient internals; expand README with usage and docs

This commit is contained in:
2026-03-02 13:09:44 +00:00
parent 5e7a84c6c3
commit 1b685091af
14 changed files with 1387 additions and 336 deletions

19
ts/gitea.classes.tag.ts Normal file
View File

@@ -0,0 +1,19 @@
import type { IGiteaTag } from './gitea.interfaces.js';
export class GiteaTag {
public readonly name: string;
public readonly commitSha: string;
constructor(raw: IGiteaTag) {
this.name = raw.name || '';
this.commitSha = raw.commit?.sha || '';
}
toJSON(): IGiteaTag {
return {
name: this.name,
id: this.name,
commit: { sha: this.commitSha },
};
}
}