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
12205123
Commit
12205123
authored
Feb 16, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
研发工单title更明确
parent
a193d01e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
WebhookServiceImpl.java
...cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
+6
-1
No files found.
src/main/java/cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
View file @
12205123
...
@@ -69,7 +69,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -69,7 +69,7 @@ public class WebhookServiceImpl implements WebhookService {
}
}
// BUG创建的时候发送通知
// BUG创建的时候发送通知
if
(
StringUtils
.
equals
(
webhookEvent
,
"jira:issue_created"
))
{
if
(
StringUtils
.
equals
(
webhookEvent
,
"jira:issue_created"
))
{
String
title
=
"线上研发工单提交"
;
String
title
=
"线上研发工单
"
+
key
+
"
提交"
;
String
content
=
"📣"
+
creator
+
"提交了线上研发工单:"
+
key
+
"\n\n"
;
String
content
=
"📣"
+
creator
+
"提交了线上研发工单:"
+
key
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
"http://jira2.quantgroup.cn/browse/"
+
key
+
")"
+
"\n\n"
content
+=
"概要:["
+
summary
+
"]("
+
"http://jira2.quantgroup.cn/browse/"
+
key
+
")"
+
"\n\n"
+
"- 优先级:"
+
priority
+
"\n"
+
"- 优先级:"
+
priority
+
"\n"
...
@@ -98,6 +98,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -98,6 +98,7 @@ public class WebhookServiceImpl implements WebhookService {
switch
(
eventTypeName
)
{
switch
(
eventTypeName
)
{
case
"issue_work_started"
:
case
"issue_work_started"
:
// BUG状态变为【处理中】
// BUG状态变为【处理中】
title
=
"研发工单"
+
key
+
"更新"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"状态变更为:【处理中】\n\n"
;
content
+=
"状态变更为:【处理中】\n\n"
;
...
@@ -105,6 +106,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -105,6 +106,7 @@ public class WebhookServiceImpl implements WebhookService {
break
;
break
;
case
"issue_resolved"
:
case
"issue_resolved"
:
// BUG状态变为【已解决】
// BUG状态变为【已解决】
title
=
"研发工单"
+
key
+
"更新"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"状态变更为:【已解决】\n\n"
;
content
+=
"状态变更为:【已解决】\n\n"
;
...
@@ -114,6 +116,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -114,6 +116,7 @@ public class WebhookServiceImpl implements WebhookService {
break
;
break
;
case
"issue_reopened"
:
case
"issue_reopened"
:
// BUG状态变为【重新打开】
// BUG状态变为【重新打开】
title
=
"研发工单"
+
key
+
"更新"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 状态更新:"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"状态变更为:【重新打开】\n\n"
;
content
+=
"状态变更为:【重新打开】\n\n"
;
...
@@ -126,6 +129,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -126,6 +129,7 @@ public class WebhookServiceImpl implements WebhookService {
break
;
break
;
case
"issue_commented"
:
case
"issue_commented"
:
// 新增BUG备注
// 新增BUG备注
title
=
"研发工单"
+
key
+
"更新"
;
content
+=
"📣研发工单 "
+
key
+
" 新增备注:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 新增备注:"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
content
+=
"概要:["
+
summary
+
"]("
+
issueUrl
+
")"
+
"\n\n"
;
String
commentBody
=
JsonPath
.
read
(
jiraData
,
"$.comment.body"
);
String
commentBody
=
JsonPath
.
read
(
jiraData
,
"$.comment.body"
);
...
@@ -140,6 +144,7 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -140,6 +144,7 @@ public class WebhookServiceImpl implements WebhookService {
break
;
break
;
case
"issue_updated"
:
case
"issue_updated"
:
// BUG更新
// BUG更新
title
=
"研发工单"
+
key
+
"更新"
;
String
changedField
=
JsonPath
.
read
(
jiraData
,
"$.changelog.items[0].field"
);
String
changedField
=
JsonPath
.
read
(
jiraData
,
"$.changelog.items[0].field"
);
if
(
StringUtils
.
equals
(
changedField
,
"assignee"
))
{
if
(
StringUtils
.
equals
(
changedField
,
"assignee"
))
{
content
+=
"📣研发工单 "
+
key
+
" 经办人变更:"
+
"\n\n"
;
content
+=
"📣研发工单 "
+
key
+
" 经办人变更:"
+
"\n\n"
;
...
...
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