File tree 3 files changed +5
-10
lines changed
3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -186,16 +186,13 @@ const ashnazgHookUrls = [
186
186
] ;
187
187
188
188
function validateAshHooks ( hooks ) {
189
- // Note: unlike `reportError` used above, here empty object literals are
190
- // pushed instead of nulls. This is simply to match the original structure
191
- // of report.json. TODO: change this to null, or add error details.
192
189
const errors = [ ] ;
193
190
const ashHooks = hooks . filter ( h => ashnazgHookUrls . includes ( h . config . url ) && h . config . contentType === "json" && h . config . insecureSsl === "0" && h . config . secret !== "" ) ;
194
191
if ( ashHooks . length === 0 ) {
195
- errors . push ( [ 'missingashnazghook' , { } ] ) ;
192
+ errors . push ( [ 'missingashnazghook' , null ] ) ;
196
193
}
197
194
if ( ashHooks . length > 1 ) {
198
- errors . push ( [ 'duplicateashnazghooks' , { } ] ) ;
195
+ errors . push ( [ 'duplicateashnazghooks' , null ] ) ;
199
196
}
200
197
return errors ;
201
198
}
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ describe('validateAshHooks', () => {
411
411
it ( 'no hooks' , ( ) => {
412
412
const hooks = [ ] ;
413
413
const errors = validateAshHooks ( hooks ) ;
414
- assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , { } ] ] ) ;
414
+ assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , null ] ] ) ;
415
415
} ) ;
416
416
417
417
it ( 'one hook' , ( ) => {
@@ -444,6 +444,6 @@ describe('validateAshHooks', () => {
444
444
}
445
445
} ] ;
446
446
const errors = validateAshHooks ( hooks ) ;
447
- assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , { } ] ] ) ;
447
+ assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , null ] ] ) ;
448
448
} ) ;
449
449
} ) ;
Original file line number Diff line number Diff line change @@ -81,9 +81,7 @@ async function validate() {
81
81
groupRepos [ gid ] . push ( {
82
82
name : r . name ,
83
83
fullName : fullName ( r ) ,
84
- // Only include `hasRecTrack` in report.json if it's true. This is
85
- // simply to match the original structure. TODO: include if false.
86
- hasRecTrack : hasRecTrack ? true : undefined ,
84
+ hasRecTrack,
87
85
} ) ;
88
86
}
89
87
if ( repoData . ashRepo ) {
You can’t perform that action at this time.
0 commit comments