Commit e929afb7 authored by 黎博's avatar 黎博

优化收到BUG时放入BUG池子的逻辑

parent 36976c95
...@@ -45,6 +45,8 @@ public class DingRobotServiceImpl extends ServiceImpl<DingRobotMapper, DingRobot ...@@ -45,6 +45,8 @@ public class DingRobotServiceImpl extends ServiceImpl<DingRobotMapper, DingRobot
break; break;
} }
} }
// 只有创建了dingRobot的项目的BUG才会被放到BUG池子里
if (robotUrl != null) {
// 首次提交的BUG放入bug池子 // 首次提交的BUG放入bug池子
JiraBugPool jiraBugPool = new JiraBugPool(); JiraBugPool jiraBugPool = new JiraBugPool();
jiraBugPool.setKey(key); jiraBugPool.setKey(key);
...@@ -55,6 +57,7 @@ public class DingRobotServiceImpl extends ServiceImpl<DingRobotMapper, DingRobot ...@@ -55,6 +57,7 @@ public class DingRobotServiceImpl extends ServiceImpl<DingRobotMapper, DingRobot
jiraBugPool.setUrl("http://jira2.quantgroup.cn/browse/" + key); jiraBugPool.setUrl("http://jira2.quantgroup.cn/browse/" + key);
jiraBugPool.setDingUrl(robotUrl); jiraBugPool.setDingUrl(robotUrl);
jiraBugPoolService.save(jiraBugPool); jiraBugPoolService.save(jiraBugPool);
}
if (robotUrl != null) { if (robotUrl != null) {
String markdownMsg = DingdingUtils.buildBugCommitMarkdownMsg(key, summary, creator, assignee, priority, module); String markdownMsg = DingdingUtils.buildBugCommitMarkdownMsg(key, summary, creator, assignee, priority, module);
return DingdingUtils.sendToDingding(markdownMsg, robotUrl); return DingdingUtils.sendToDingding(markdownMsg, robotUrl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment