@ Override public Collection < CodeReviewAuditResponse > getPeerReviewResponses ( String repoUrl , String repoBranch , String scmName , long beginDt , long endDt ) { Collector githubCollector = collectorRepository . findByName ( ! StringUtils . isEmpty ( scmName ) ? scmName : "GitHub" ) ; CollectorItem collectorItem = collectorItemRepository . findRepoByUrlAndBranch ( githubCollector . getId ( ) , repoUrl , repoBranch , true ) ; // This is the list of repos in the database with the same repoUrl, but a different branch. List < CollectorItem > filteredCollectorItemList = new ArrayList <> ( ) ; if ( ( collectorItem != null ) && ( collectorItem . isPushed ( ) ) ) { List < ObjectId > collectorIdList = new ArrayList <> ( ) ; collectorIdList . add ( githubCollector . getId ( ) ) ; Iterable < CollectorItem > collectorItemIterable = collectorItemRepository . findAllByOptionNameValueAndCollectorIdsIn ( REPO_URL , repoUrl , collectorIdList ) ; for ( CollectorItem ci : collectorItemIterable ) { if ( repoBranch . equalsIgnoreCase ( ( String ) ci . getOptions ( ) . get ( BRANCH ) ) ) { continue ; } filteredCollectorItemList . add ( ci ) ; } return codeReviewEvaluatorLegacy . evaluate ( collectorItem , filteredCollectorItemList , beginDt , endDt , null ) ; } return codeReviewEvaluatorLegacy . evaluate ( collectorItem , beginDt , endDt , null ) ; }
Calculates peer review response