Skip to content

Commit 9524286

Browse files
committed
ci: add notifications feature for pull requests too
1 parent 4b83d1b commit 9524286

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

.teamcity/builds/Build.kt

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -125,27 +125,25 @@ class Build(
125125
buildType(it)
126126
}
127127

128-
if (!forPullRequests) {
129-
complete.features {
130-
notifications {
131-
branchFilter =
132-
"""
128+
complete.features {
129+
notifications {
130+
branchFilter =
131+
"""
133132
+:$DEFAULT_BRANCH
134133
${if (forPullRequests) "+:pull/*" else ""}
135134
"""
136-
.trimIndent()
137-
138-
queuedBuildRequiresApproval = forPullRequests
139-
buildFailedToStart = !forPullRequests
140-
buildFailed = !forPullRequests
141-
buildFinishedSuccessfully = !forPullRequests
142-
buildProbablyHanging = !forPullRequests
143-
144-
notifierSettings = slackNotifier {
145-
connection = SLACK_CONNECTION_ID
146-
sendTo = SLACK_CHANNEL
147-
messageFormat = simpleMessageFormat()
148-
}
135+
.trimIndent()
136+
137+
queuedBuildRequiresApproval = forPullRequests
138+
buildFailedToStart = !forPullRequests
139+
buildFailed = !forPullRequests
140+
buildFinishedSuccessfully = !forPullRequests
141+
buildProbablyHanging = !forPullRequests
142+
143+
notifierSettings = slackNotifier {
144+
connection = SLACK_CONNECTION_ID
145+
sendTo = SLACK_CHANNEL
146+
messageFormat = simpleMessageFormat()
149147
}
150148
}
151149
}

0 commit comments

Comments
 (0)