@@ -125,11 +125,11 @@ class Job {
125
125
return `https://${ CI_DOMAIN } /${ path } console` ;
126
126
}
127
127
128
- async getBuildData ( ) {
128
+ async getBuildData ( type = 'Build' ) {
129
129
const { cli, path } = this ;
130
130
cli . startSpinner ( `Querying data for ${ path } ` ) ;
131
131
const data = await this . getAPIData ( ) ;
132
- cli . stopSpinner ( 'Build data downloaded' ) ;
132
+ cli . stopSpinner ( ` ${ type } data downloaded` ) ;
133
133
return data ;
134
134
}
135
135
@@ -763,7 +763,7 @@ class CITGMBuild extends TestBuild {
763
763
async getResults ( ) {
764
764
let headerData ;
765
765
try {
766
- headerData = await this . getBuildData ( ) ;
766
+ headerData = await this . getBuildData ( 'Header' ) ;
767
767
} catch ( err ) {
768
768
this . failures = [
769
769
new NCUFailure ( { url : this . apiUrl } , err . message )
@@ -778,7 +778,7 @@ class CITGMBuild extends TestBuild {
778
778
779
779
let resultData ;
780
780
try {
781
- resultData = await this . getBuildData ( ) ;
781
+ resultData = await this . getBuildData ( 'Report' ) ;
782
782
} catch ( err ) {
783
783
this . failures = [
784
784
new NCUFailure ( { url : this . apiUrl } , err . message )
@@ -818,17 +818,14 @@ class CITGMBuild extends TestBuild {
818
818
const { cli, results } = this ;
819
819
820
820
cli . separator ( 'Failures' ) ;
821
+ const output = { } ;
821
822
for ( const failure of results . failures ) {
822
823
const platform = Object . keys ( failure ) [ 0 ] ;
823
824
const modules = failure [ platform ] . map ( f => f . name ) ;
824
-
825
- cli . table ( platform , `${ modules . length } Failures` , 25 ) ;
826
- cli . write ( '\n' ) ;
827
- cli . table ( ' ' . repeat ( 11 ) , modules . join ( '\n' + ' ' . repeat ( 11 ) ) ) ;
828
- cli . write ( '\n\n' ) ;
825
+ output [ platform ] = modules ;
829
826
}
830
827
831
- // TODO(codebytere): how to display other builds?
828
+ console . table ( output ) ;
832
829
}
833
830
834
831
updateAPIVariables ( ) {
@@ -840,10 +837,6 @@ class CITGMBuild extends TestBuild {
840
837
this . displayHeader ( ) ;
841
838
this . displayBuilds ( ) ;
842
839
}
843
-
844
- formatAsMarkdown ( ) {
845
- // TODO(codebytere): implement.
846
- }
847
840
}
848
841
849
842
function filterBuild ( builds , type ) {
0 commit comments