File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -186,16 +186,13 @@ const ashnazgHookUrls = [
186186] ;
187187
188188function 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.
192189 const errors = [ ] ;
193190 const ashHooks = hooks . filter ( h => ashnazgHookUrls . includes ( h . config . url ) && h . config . contentType === "json" && h . config . insecureSsl === "0" && h . config . secret !== "" ) ;
194191 if ( ashHooks . length === 0 ) {
195- errors . push ( [ 'missingashnazghook' , { } ] ) ;
192+ errors . push ( [ 'missingashnazghook' , null ] ) ;
196193 }
197194 if ( ashHooks . length > 1 ) {
198- errors . push ( [ 'duplicateashnazghooks' , { } ] ) ;
195+ errors . push ( [ 'duplicateashnazghooks' , null ] ) ;
199196 }
200197 return errors ;
201198}
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ describe('validateAshHooks', () => {
411411 it ( 'no hooks' , ( ) => {
412412 const hooks = [ ] ;
413413 const errors = validateAshHooks ( hooks ) ;
414- assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , { } ] ] ) ;
414+ assert . deepStrictEqual ( errors , [ [ 'missingashnazghook' , null ] ] ) ;
415415 } ) ;
416416
417417 it ( 'one hook' , ( ) => {
@@ -444,6 +444,6 @@ describe('validateAshHooks', () => {
444444 }
445445 } ] ;
446446 const errors = validateAshHooks ( hooks ) ;
447- assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , { } ] ] ) ;
447+ assert . deepStrictEqual ( errors , [ [ 'duplicateashnazghooks' , null ] ] ) ;
448448 } ) ;
449449} ) ;
Original file line number Diff line number Diff line change @@ -81,9 +81,7 @@ async function validate() {
8181 groupRepos [ gid ] . push ( {
8282 name : r . name ,
8383 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,
8785 } ) ;
8886 }
8987 if ( repoData . ashRepo ) {
You can’t perform that action at this time.
0 commit comments