Skip to content

Instantly share code, notes, and snippets.

@ky13
Created April 28, 2017 23:13
Show Gist options
  • Save ky13/235287494595070e7a9ab260d1c3c0f3 to your computer and use it in GitHub Desktop.
Save ky13/235287494595070e7a9ab260d1c3c0f3 to your computer and use it in GitHub Desktop.
recipients = emailextrecipients([
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
]).split(' ')
def filtered = []
for (int i=0; i<recipients.length; i++) {
if (recipients[i].contains('@foo.bar')) {
println("Adding [${recipients[0]}]")
filtered << recipients[i]
}
}
emailext(subject: subject, body: details, to: filtered.join(' '))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment