Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Bk Ci
Commits
3e0eadae
Commit
3e0eadae
authored
3 years ago
by
fitzcao
Committed by
irwinsun
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
feat: 手动取消流水线,希望能够不发送企业微信消息通知 #5329
parent
a4508b0d
v1.7.10-RC.3
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/notify/command/impl/NotifySendCmd.kt
+12
-12
...ncent/devops/process/notify/command/impl/NotifySendCmd.kt
with
12 additions
and
12 deletions
+12
-12
src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/notify/command/impl/NotifySendCmd.kt
+
12
-
12
View file @
3e0eadae
...
...
@@ -31,26 +31,25 @@ class NotifySendCmd @Autowired constructor(
var
templateCode
=
""
var
notifyType
=
mutableSetOf
<
String
>()
var
settingDetailFlag
=
false
var
sendMsg
=
false
when
{
buildStatus
.
isFailure
()
->
{
settingDetailFlag
=
setting
.
failSubscription
.
detailFlag
templateCode
=
getNotifyTemplateCode
(
shutdownType
,
settingDetailFlag
)
notifyType
=
setting
.
failSubscription
.
types
.
map
{
it
.
name
}.
toMutableSet
()
}
buildStatus
.
isCancel
()
->
{
settingDetailFlag
=
setting
.
failSubscription
.
detailFlag
templateCode
=
getNotifyTemplateCode
(
shutdownType
,
settingDetailFlag
)
notifyType
=
setting
.
failSubscription
.
types
.
map
{
it
.
name
}.
toMutableSet
()
sendMsg
=
true
}
buildStatus
.
isSuccess
()
->
{
settingDetailFlag
=
setting
.
successSubscription
.
detailFlag
templateCode
=
getNotifyTemplateCode
(
shutdownType
,
settingDetailFlag
)
notifyType
=
setting
.
successSubscription
.
types
.
map
{
it
.
name
}.
toMutableSet
()
sendMsg
=
true
}
else
->
Result
<
Any
>(
0
)
}
if
(
sendMsg
)
{
sendNotifyByTemplate
(
templateCode
=
templateCode
,
receivers
=
commandContextBuild
.
receivers
,
...
...
@@ -59,6 +58,7 @@ class NotifySendCmd @Autowired constructor(
bodyParams
=
commandContextBuild
.
notifyValue
)
}
}
private
fun
getNotifyTemplateCode
(
type
:
Int
,
detailFlag
:
Boolean
):
String
{
return
if
(
detailFlag
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help