import { ObjectType, Field } from '@nestjs/graphql'; import { Type } from 'class-transformer'; import { LogResult, DefaultLogFields } from 'simple-git'; import { PipelineTask } from '../../pipeline-tasks/pipeline-task.entity'; @ObjectType() export class Commit { hash: string; @Type(() => Date) date: Date; message: string; refs: string; body: string; author_name: string; author_email: string; tasks: PipelineTask[]; } @ObjectType() export class LogFields { hash: string; date: string; message: string; refs: string; body: string; author_name: string; author_email: string; tasks: PipelineTask[]; } @ObjectType() export class LogList implements LogResult { @Field(() => [LogFields]) all: LogFields[]; total: number; latest: LogFields; }