class GitRepoPublishTaskServiceImpl implements GitRepoPublishTaskService {

	@Override
	public GitRepoPublishTask save(GitRepoPublishTask task) {
		Integer maxSeq = gitRepoPublishTaskDao
			.findFirstByGitUrlAndCreateUserIdOrderBySeqDesc(task.getGitUrl(), task.getCreateUserId())
			.map(GitRepoPublishTask::getSeq)
			.orElse(0);
		task.setSeq(maxSeq + 1);
		return gitRepoPublishTaskDao.save(task);
	}

}