@@ -28,7 +28,7 @@ var timestamp;
2828var token = process . env . COVERALLS_TOKEN ;
2929
3030/**
31- * Formates list of classes from XML file and return object formatted for the Coveralls API.
31+ * Formats list of classes from XML file and return object formatted for the Coveralls API.
3232 * @see {@link https://docs.coveralls.io/api-reference|Coveralls API docs }
3333 * @param {Array } classList - An array of class objects from the loaded XML file.
3434 * @param {String } path - The root path of the code repository.
@@ -41,7 +41,7 @@ var token = process.env.COVERALLS_TOKEN;
4141const formatCoverage = function ( classList , path , sha ) {
4242 var job = { } ;
4343 var sourceFiles = [ ] ;
44- typeof path != "undefined" ? 'C:\\Users\\User\\' : path ; // default FIXME
44+ path = typeof path != "undefined" ? process . env . HOMEPATH : path ; // default to home dir
4545 // For each class, create file object containing array of lines covered and add to sourceFile array
4646 classList . forEach ( async c => {
4747 let file = { } ; // Initialize file object
@@ -59,7 +59,7 @@ const formatCoverage = function(classList, path, sha) {
5959 } ) ;
6060
6161 job . repo_token = token ; // env secret token?
62- job . service_name = ' continuous-integration/ZTEST' ;
62+ job . service_name = ` continuous-integration/${ process . env . USERDOMAIN } ` ;
6363 // The associated pull request ID of the build. Used for updating the status and/or commenting.
6464 job . service_pull_request = '' ;
6565 job . source_files = sourceFiles ;
@@ -102,7 +102,7 @@ const coverage = function(path, repo, sha, callback) {
102102 if ( e . $ . filename . startsWith ( 'signals\\' ) ) { modules . signals . push ( e ) ; return false ; }
103103 if ( e . $ . filename . startsWith ( 'npy-matlab\\' ) ) { modules [ 'npy-matlab' ] . push ( e ) ; return false ; }
104104 if ( e . $ . filename . startsWith ( 'wheelAnalysis\\' ) ) { modules . wheelAnalysis . push ( e ) ; return false ; }
105- else { return true } ;
105+ else { return true }
106106 } ) ;
107107 formatCoverage ( modules [ repo . toLowerCase ( ) ] , rigboxPath , callback ) ;
108108 } ) ;
@@ -123,4 +123,4 @@ md5 = function(path) {
123123} ;
124124
125125// Export Coverage
126- module . exports = coverage ;
126+ module . exports = coverage ;
0 commit comments