mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-05 13:25:19 +02:00
Ignore email addresses containing string "noreply" (#1178)
* avoid sending mails to addresses which contain the string noreply * enrich test to ensure that mails containing the string noreply never end up in recipient list * Update MailSendNotificationTest.groovy
This commit is contained in:
parent
00b094d74b
commit
0d82a39098
@ -41,6 +41,7 @@ class MailSendNotificationTest extends BasePiperTest {
|
||||
user1@domain.com noreply+github@domain.com
|
||||
user3@domain.com noreply+github@domain.com
|
||||
user2@domain.com user1@domain.com
|
||||
user1@noreply.domain.com
|
||||
user1@domain.com noreply+github@domain.com
|
||||
user3@domain.com noreply+github@domain.com
|
||||
user3@domain.com noreply+github@domain.com
|
||||
|
@ -240,7 +240,7 @@ def getDistinctRecipients(recipients){
|
||||
address = address.trim()
|
||||
if(address
|
||||
&& address.contains("@")
|
||||
&& !address.startsWith("noreply")
|
||||
&& !address.contains("noreply")
|
||||
&& !knownAddresses.contains(address)) {
|
||||
knownAddresses.add(address)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user