protected RepoBranch getComponentRepoBranch ( Component component ) { CollectorItem item = component . getFirstCollectorItemForType ( CollectorType . SCM ) ; if ( item == null ) { logger . warn ( "Error encountered building pipeline: could not find scm collector item for dashboard." ) ; return new RepoBranch ( "" , "" , RepoType . Unknown ) ; } // TODO find a better way? String url = ( String ) item . getOptions ( ) . get ( "url" ) ; String branch = ( String ) item . getOptions ( ) . get ( "branch" ) ; return new RepoBranch ( url , branch , RepoType . Unknown ) ; }
Determine the SCM url and branch that is set for the component . Information is gathered with the assumption that the data is stored in options . url and options . branch .