fix: application mr 合并失败后,抛出异常,保持 mr open 状态
This commit is contained in:
@@ -62,7 +62,7 @@ public enum RCode {
|
||||
|
||||
// GIT
|
||||
GIT_COMMIT_CONFLICT_ERROR(203001, "Commit failed; fix conflicts and then commit the result"),
|
||||
GIT_MERGE_FAILED(203002, "Merge failed"),
|
||||
GIT_MERGE_FAILED(203002, "Merge failed,error message: {0}"),
|
||||
GIT_PARENT_COMMITID_NOT_FOUND(203003, "Parent commitId not found"),
|
||||
GIT_BINARY_CONFLICT_ERROR(203004, "Binary file conflict found; resolve conflicts in binary files manually"),
|
||||
GIT_MERGE_NOT_SUPPORTED(203005, "Cannot merge in the {0} state"),
|
||||
|
||||
@@ -247,9 +247,7 @@ public class ApplicationMergeServiceImpl extends ServiceImpl<ApplicationMergeDao
|
||||
entity.setStatus(MergeRequestStatus.MERGED.toString());
|
||||
} catch (Exception e) {
|
||||
log.error(e, "[newMr] [merge error] [workspaceId: {}] [srcBranch: {}] [tgtBranch: {}] [msg: {}]", workspaceId, srcBranch, tgtBranch, e.getMessage());
|
||||
entity.setCommitId("");
|
||||
entity.setStatus(MergeRequestStatus.FAILED.toString());
|
||||
entity.setMessage(e.getMessage());
|
||||
throw new ASWException(RCode.GIT_MERGE_FAILED.setParam(e.getMessage()));
|
||||
}
|
||||
|
||||
// remove source branch
|
||||
@@ -307,16 +305,6 @@ public class ApplicationMergeServiceImpl extends ServiceImpl<ApplicationMergeDao
|
||||
return false;
|
||||
}
|
||||
},
|
||||
FAILED {
|
||||
// 合并失败
|
||||
public String toString() {
|
||||
return "failed";
|
||||
}
|
||||
|
||||
public boolean canMerge() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
CLOSED {
|
||||
// 合并关闭
|
||||
public String toString() {
|
||||
|
||||
@@ -143,8 +143,8 @@ INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (235, '202003', 'PACKAGE_FILE_TYPE_ERROR', '无效安装包文件', 'zh', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (236, '203001', 'GIT_COMMIT_CONFLICT_ERROR', 'Commit failed; fix conflicts and then commit the result', 'en', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (237, '203001', 'GIT_COMMIT_CONFLICT_ERROR', '提交失败;解决冲突,然后提交结果', 'zh', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (238, '203002', 'GIT_MERGE_FAILED', 'Merge failed', 'en', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (239, '203002', 'GIT_MERGE_FAILED', '合并失败', 'zh', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (238, '203002', 'GIT_MERGE_FAILED', 'Merge failed,error message: {0}', 'en', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (239, '203002', 'GIT_MERGE_FAILED', '合并失败,错误信息:{0}', 'zh', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (240, '302003', 'PLAYBOOK_INVALID_FILE', 'playbook Invalid file', 'en', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (241, '302003', 'PLAYBOOK_INVALID_FILE', '无效文件', 'zh', '', 'admin', 1724030366000);
|
||||
INSERT INTO `sys_i18n`(`id`, `name`, `code`, `value`, `lang`, `remark`, `update_user_id`, `update_timestamp`) VALUES (242, '202004', 'PACKAGE_CANNOT_DELETE', 'The referenced package cannot be deleted', 'en', '', 'admin', 1724030366000);
|
||||
|
||||
Reference in New Issue
Block a user