fix: 调整 mr merge 提交信息
This commit is contained in:
@@ -251,7 +251,11 @@ public class ApplicationMergeServiceImpl extends ServiceImpl<ApplicationMergeDao
|
||||
String srcBranch = entity.getSourceBranch();
|
||||
String tgtBranch = entity.getTargetBranch();
|
||||
|
||||
String message = entity.getTitle();
|
||||
StringBuilder commitMessage = new StringBuilder();
|
||||
commitMessage.append("Merge branch '").append(tgtBranch).append("' into '").append(srcBranch).append("'\n\n");
|
||||
commitMessage.append(entity.getTitle());
|
||||
commitMessage.append("\n");
|
||||
|
||||
String workspaceId = entity.getWorkspaceId();
|
||||
|
||||
// 检查 tgtBranch 是否存在
|
||||
@@ -261,7 +265,7 @@ public class ApplicationMergeServiceImpl extends ServiceImpl<ApplicationMergeDao
|
||||
|
||||
// merge
|
||||
try {
|
||||
gitService.mergeBranch(workspaceId, srcBranch, tgtBranch, message, null);
|
||||
gitService.mergeBranch(workspaceId, srcBranch, tgtBranch, commitMessage.toString(), null);
|
||||
String latestCommitId = gitService.getLatestCommitId(workspaceId, srcBranch);
|
||||
entity.setEndCommitId(latestCommitId);
|
||||
entity.setStatus(MergeRequestStatus.MERGED.toString());
|
||||
|
||||
Reference in New Issue
Block a user