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

View File

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