37 lines
800 B
TypeScript
37 lines
800 B
TypeScript
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<DefaultLogFields> {
|
|
@Field(() => [LogFields])
|
|
all: LogFields[];
|
|
total: number;
|
|
latest: LogFields;
|
|
}
|