Files
gitea/ts/gitea.classes.tag.ts

20 lines
397 B
TypeScript

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 },
};
}
}