| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package cn.seecoder.web.service.project;
- import cn.seecoder.web.model.enums.CommitRelatedEnum;
- import cn.seecoder.web.model.po.project.CommitPO;
- import cn.seecoder.web.model.vo.project.CommitVO;
- import com.nju.edu.gitlab.vo.DiffVO;
- import java.util.List;
- import java.util.Set;
- /**
- * @author PuHong Weng
- * @date 2021/3/21
- * @description: 项目相关的 git commit 记录分析功能
- */
- public interface CommitService {
- void save(CommitPO po);
- List<CommitPO> listByProjectAndType(Integer projectId, CommitRelatedEnum type);
- /**
- * 不同分支可能会push相同的commit,分析过的commit不应该再分析,这里是判断是否分析共没有
- * @param id commit hash id
- */
- boolean isResolved(String id);
- List<CommitVO> getTreeCommit(Integer treeId);
- List<CommitVO> getBugCommit(Integer bugId);
- List<CommitVO> getCommits(Integer projectId);
- List<CommitVO> getCommitsByBranchName(Integer projectId, String branchName);
- CommitVO getCommitByHash(Integer projectId, String hash);
- Set<DiffVO> getDiff(Integer projectId, String fromHash, String toHash);
- /**
- * link commit and tree node or bug
- * @param projectId
- * @param commitHash
- * @param relatedType
- * @param relatedId
- * @return
- */
- boolean link(Integer projectId, String commitHash, CommitRelatedEnum relatedType, Integer relatedId);
- }
|