feat(pipelines): add commits query api.

This commit is contained in:
Ivan Li
2021-05-09 16:54:59 +08:00
parent 5a8b699e2f
commit 4041a6fd2a
6 changed files with 55 additions and 7 deletions

View File

@ -26,6 +26,13 @@ export class PipelinesService extends BaseDbService<Pipeline> {
return this.repository.find(dto);
}
async findOneWithProject(id: string) {
return await this.repository.findOne({
where: { id },
relations: ['project'],
});
}
async create(dto: CreatePipelineInput) {
await this.isDuplicateEntity(dto);
return await this.repository.save(this.repository.create(dto));