feat(client): add rich domain classes, helpers, and refactor GitLabClient internals

This commit is contained in:
2026-03-02 13:10:54 +00:00
parent 4d90bb01cf
commit 7ba0fc984e
13 changed files with 1587 additions and 392 deletions

View File

@@ -0,0 +1,21 @@
import type { IGitLabProtectedBranch } from './gitlab.interfaces.js';
export class GitLabProtectedBranch {
public readonly id: number;
public readonly name: string;
public readonly allowForcePush: boolean;
constructor(raw: IGitLabProtectedBranch) {
this.id = raw.id;
this.name = raw.name || '';
this.allowForcePush = raw.allow_force_push ?? false;
}
toJSON(): IGitLabProtectedBranch {
return {
id: this.id,
name: this.name,
allow_force_push: this.allowForcePush,
};
}
}