Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
ddee8e9d
Commit
ddee8e9d
authored
Feb 17, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线上@具体人
parent
9750fbf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
WebhookServiceImpl.java
...cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
+14
-8
No files found.
src/main/java/cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
View file @
ddee8e9d
...
@@ -123,6 +123,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -123,6 +123,7 @@ public class WebhookServiceImpl implements WebhookService {
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"状态变更为:【处理中】\n\n"
;
content
+=
"状态变更为:【处理中】\n\n"
;
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
),
webhook
);
break
;
break
;
case
"issue_resolved"
:
case
"issue_resolved"
:
// BUG状态变为【已解决】
// BUG状态变为【已解决】
...
@@ -132,6 +133,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -132,6 +133,7 @@ public class WebhookServiceImpl implements WebhookService {
content
+=
"状态变更为:【已解决】\n\n"
;
content
+=
"状态变更为:【已解决】\n\n"
;
// content += "状态变更为:【已解决】, 解决结果为:【" + JsonPath.read(jiraData, "$.changelog.items[0].toString") + "】\n\n";
// content += "状态变更为:【已解决】, 解决结果为:【" + JsonPath.read(jiraData, "$.changelog.items[0].toString") + "】\n\n";
content
+=
"请相关同学跟进验收~"
;
content
+=
"请相关同学跟进验收~"
;
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
),
webhook
);
break
;
break
;
case
"issue_reopened"
:
case
"issue_reopened"
:
// BUG状态变为【重新打开】
// BUG状态变为【重新打开】
...
@@ -140,6 +142,8 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -140,6 +142,8 @@ public class WebhookServiceImpl implements WebhookService {
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"状态变更为:【重新打开】\n\n"
;
content
+=
"状态变更为:【重新打开】\n\n"
;
content
+=
"请相关同学再跟进一下~"
;
content
+=
"请相关同学再跟进一下~"
;
// 发送消息
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
),
webhook
);
break
;
break
;
case
"issue_closed"
:
case
"issue_closed"
:
// BUG状态变为【关闭】
// BUG状态变为【关闭】
...
@@ -158,6 +162,8 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -158,6 +162,8 @@ public class WebhookServiceImpl implements WebhookService {
content
+=
"> "
+
comment
+
"\n\n"
;
content
+=
"> "
+
comment
+
"\n\n"
;
}
}
}
}
// 发送消息
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
),
webhook
);
break
;
break
;
case
"issue_updated"
:
case
"issue_updated"
:
// BUG更新
// BUG更新
...
@@ -169,19 +175,19 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -169,19 +175,19 @@ public class WebhookServiceImpl implements WebhookService {
content
+=
"- 原经办人:"
+
JsonPath
.
read
(
jiraData
,
"$.changelog.items[0].fromString"
)
+
"\n"
;
content
+=
"- 原经办人:"
+
JsonPath
.
read
(
jiraData
,
"$.changelog.items[0].fromString"
)
+
"\n"
;
// content += "- 新经办人:" + JsonPath.read(jiraData, "$.changelog.items[0].toString") + "\n";
// content += "- 新经办人:" + JsonPath.read(jiraData, "$.changelog.items[0].toString") + "\n";
content
+=
"- 新经办人:"
+
assignee
+
"\n"
;
content
+=
"- 新经办人:"
+
assignee
+
"\n"
;
// 发送消息
String
markdownMsg
;
if
(
atFlag
)
{
markdownMsg
=
DingdingUtils
.
buildMarkdownMsgAtSpecifyPhone
(
title
,
content
,
atPhoneNo
,
false
);
}
else
{
markdownMsg
=
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
);
}
DingdingUtils
.
sendToDingding
(
markdownMsg
,
webhook
);
}
}
break
;
break
;
default
:
default
:
break
;
break
;
}
}
// 发送消息
String
markdownMsg
;
if
(
atFlag
)
{
markdownMsg
=
DingdingUtils
.
buildMarkdownMsgAtSpecifyPhone
(
title
,
content
,
atPhoneNo
,
false
);
}
else
{
markdownMsg
=
DingdingUtils
.
buildMarkdownMsg
(
title
,
content
,
false
);
}
DingdingUtils
.
sendToDingding
(
markdownMsg
,
webhook
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment