String committerField = (String) notifier.getConfiguration().get( COMMITTER_FIELD );
if ( StringUtils.isNotEmpty( committerField ) && context.getBuildResult() != null )
{
if ( Boolean.parseBoolean( committerField ) )
{
ScmResult scmResult = context.getBuildResult().getScmResult();
if ( scmResult != null && scmResult.getChanges() != null &&
!scmResult.getChanges().isEmpty() )
{
List<ProjectDeveloper> developers = project.getDevelopers();
if ( developers == null || developers.isEmpty() )
{
log.warn( "No developers have been configured...notifcation email " +
"will not be sent" );
return;
}
Map<String, String> developerToEmailMap = mapDevelopersToRecipients( developers );
List<ChangeSet> changes = scmResult.getChanges();
for ( ChangeSet changeSet : changes )
{
String scmId = changeSet.getAuthor();
if (StringUtils.isNotEmpty(scmId))