private Optional < String > guessScmAuthor ( DefaultIssue issue , Component component ) { String author = null ; if ( scmChangesets != null ) { author = IssueLocations . allLinesFor ( issue , component . getUuid ( ) ) . filter ( scmChangesets :: hasChangesetForLine ) . mapToObj ( scmChangesets :: getChangesetForLine ) . filter ( c -> StringUtils . isNotEmpty ( c . getAuthor ( ) ) ) . max ( Comparator . comparingLong ( Changeset :: getDate ) ) . map ( Changeset :: getAuthor ) . orElse ( null ) ; } return Optional . ofNullable ( defaultIfEmpty ( author , lastCommitAuthor ) ) ; }
Author of the latest change on the lines involved by the issue . If no authors are set on the lines then the author of the latest change on the file is returned .