@@ -431,6 +431,8 @@ describe('detect-node-support', () => {
431431 . reply ( 200 , {
432432 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
433433 } )
434+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
435+ . reply ( 404 )
434436 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
435437 . reply ( 200 , {
436438 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -468,6 +470,8 @@ describe('detect-node-support', () => {
468470 . reply ( 200 , {
469471 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
470472 } )
473+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
474+ . reply ( 404 )
471475 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
472476 . reply ( 200 , {
473477 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -505,6 +509,8 @@ describe('detect-node-support', () => {
505509 . reply ( 200 , {
506510 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
507511 } )
512+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
513+ . reply ( 404 )
508514 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
509515 . reply ( 404 ) ;
510516
@@ -532,6 +538,8 @@ describe('detect-node-support', () => {
532538 . reply ( 200 , {
533539 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
534540 } )
541+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
542+ . reply ( 404 )
535543 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
536544 . reply ( 500 , 'Simulated server error' ) ;
537545
@@ -546,6 +554,8 @@ describe('detect-node-support', () => {
546554 Nock ( 'https://api.github.com' )
547555 . get ( '/repos/pkgjs/detect-node-support/contents/package.json' )
548556 . reply ( 404 )
557+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
558+ . reply ( 404 )
549559 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
550560 . reply ( 200 , {
551561 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -560,6 +570,8 @@ describe('detect-node-support', () => {
560570 Nock ( 'https://api.github.com' )
561571 . get ( '/repos/pkgjs/detect-node-support/contents/package.json' )
562572 . reply ( 500 )
573+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
574+ . reply ( 404 )
563575 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
564576 . reply ( 200 , {
565577 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -601,6 +613,8 @@ describe('detect-node-support', () => {
601613 'x-ratelimit-remaining' : '0' ,
602614 'x-ratelimit-reset' : `${ Math . round ( Date . now ( ) / 1000 ) + 1 } `
603615 } )
616+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
617+ . reply ( 404 )
604618 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
605619 . reply ( 200 , {
606620 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -635,6 +649,8 @@ describe('detect-node-support', () => {
635649 . reply ( 200 , {
636650 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
637651 } )
652+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
653+ . reply ( 404 )
638654 // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
639655 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
640656 . reply ( 403 , 'You have exceeded a secondary rate limit' ) ;
@@ -659,6 +675,8 @@ describe('detect-node-support', () => {
659675 . reply ( 200 , {
660676 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
661677 } )
678+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
679+ . reply ( 404 )
662680 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
663681 . reply ( 200 , {
664682 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -700,6 +718,8 @@ describe('detect-node-support', () => {
700718 . reply ( 200 , {
701719 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
702720 } )
721+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
722+ . reply ( 404 )
703723 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
704724 . reply ( 404 ) ;
705725
@@ -785,6 +805,8 @@ describe('detect-node-support', () => {
785805 . reply ( 200 , {
786806 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
787807 } )
808+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
809+ . reply ( 404 )
788810 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
789811 . reply ( 200 , {
790812 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -829,6 +851,8 @@ describe('detect-node-support', () => {
829851 . reply ( 200 , {
830852 content : Buffer . from ( JSON . stringify ( { name : 'something-else' } ) ) . toString ( 'base64' )
831853 } )
854+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
855+ . reply ( 404 )
832856 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
833857 . reply ( 200 , {
834858 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -879,6 +903,8 @@ describe('detect-node-support', () => {
879903 . reply ( 200 , {
880904 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
881905 } )
906+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
907+ . reply ( 404 )
882908 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
883909 . reply ( 200 , {
884910 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -916,6 +942,8 @@ describe('detect-node-support', () => {
916942 . reply ( 200 , {
917943 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
918944 } )
945+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
946+ . reply ( 404 )
919947 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
920948 . reply ( 200 , {
921949 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -953,6 +981,8 @@ describe('detect-node-support', () => {
953981 . reply ( 200 , {
954982 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
955983 } )
984+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
985+ . reply ( 404 )
956986 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
957987 . reply ( 200 , {
958988 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -994,6 +1024,8 @@ describe('detect-node-support', () => {
9941024 . reply ( 200 , {
9951025 content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'hapi-package.json' ) ) . toString ( 'base64' )
9961026 } )
1027+ . get ( '/repos/hapijs/hapi/contents/.github%2Fworkflows' )
1028+ . reply ( 404 )
9971029 . get ( '/repos/hapijs/hapi/contents/.travis.yml' )
9981030 . reply ( 200 , {
9991031 content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -1046,34 +1078,47 @@ describe('detect-node-support', () => {
10461078 . reply ( 200 , Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'packuments' , 'rimraf.json' ) ) ) ;
10471079
10481080 Nock ( 'https://api.github.com' )
1081+
10491082 . get ( '/repos/watson/is-ci/contents/package.json' )
10501083 . reply ( 200 , {
10511084 content : Buffer . from ( JSON . stringify ( { name : 'is-ci' , version : '2.0.0' } ) ) . toString ( 'base64' )
10521085 } )
1086+ . get ( '/repos/watson/is-ci/contents/.github%2Fworkflows' )
1087+ . reply ( 404 )
10531088 . get ( '/repos/watson/is-ci/contents/.travis.yml' )
10541089 . reply ( 200 , {
10551090 content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'travis-ymls' , 'testing-single-version.yml' ) ) . toString ( 'base64' )
10561091 } )
1092+
10571093 . get ( '/repos/watson/ci-info/contents/package.json' )
10581094 . reply ( 200 , {
10591095 content : Buffer . from ( JSON . stringify ( { name : 'ci-info' , version : '2.0.0' } ) ) . toString ( 'base64' )
10601096 } )
1097+ . get ( '/repos/watson/ci-info/contents/.github%2Fworkflows' )
1098+ . reply ( 404 )
10611099 . get ( '/repos/watson/ci-info/contents/.travis.yml' )
10621100 . reply ( 200 , {
10631101 content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'travis-ymls' , 'testing-single-version.yml' ) ) . toString ( 'base64' )
10641102 } )
1103+
10651104 . get ( '/repos/visionmedia/debug/contents/package.json' )
10661105 . reply ( 200 , {
10671106 content : Buffer . from ( JSON . stringify ( { name : 'debug' , version : '4.1.1' } ) ) . toString ( 'base64' )
10681107 } )
1108+ . get ( '/repos/visionmedia/debug/contents/.github%2Fworkflows' )
1109+ . reply ( 404 )
10691110 . get ( '/repos/visionmedia/debug/contents/.travis.yml' )
10701111 . reply ( 404 )
1112+
10711113 . get ( '/repos/zeit/ms/contents/package.json' )
10721114 . reply ( 200 , {
10731115 content : Buffer . from ( JSON . stringify ( { name : 'ms' , version : '2.1.2' } ) ) . toString ( 'base64' )
10741116 } )
1117+ . get ( '/repos/zeit/ms/contents/.github%2Fworkflows' )
1118+ . reply ( 404 )
10751119 . get ( '/repos/zeit/ms/contents/.travis.yml' )
10761120 . reply ( 404 )
1121+
10771122 . get ( '/repos/isaacs/rimraf/contents/package.json' )
10781123 . reply ( 404 ) ;
10791124 } ) ;
0 commit comments