@@ -431,6 +431,8 @@ describe('detect-node-support', () => {
431
431
. reply ( 200 , {
432
432
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
433
433
} )
434
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
435
+ . reply ( 404 )
434
436
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
435
437
. reply ( 200 , {
436
438
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -468,6 +470,8 @@ describe('detect-node-support', () => {
468
470
. reply ( 200 , {
469
471
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
470
472
} )
473
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
474
+ . reply ( 404 )
471
475
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
472
476
. reply ( 200 , {
473
477
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -505,6 +509,8 @@ describe('detect-node-support', () => {
505
509
. reply ( 200 , {
506
510
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
507
511
} )
512
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
513
+ . reply ( 404 )
508
514
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
509
515
. reply ( 404 ) ;
510
516
@@ -532,6 +538,8 @@ describe('detect-node-support', () => {
532
538
. reply ( 200 , {
533
539
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
534
540
} )
541
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
542
+ . reply ( 404 )
535
543
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
536
544
. reply ( 500 , 'Simulated server error' ) ;
537
545
@@ -546,6 +554,8 @@ describe('detect-node-support', () => {
546
554
Nock ( 'https://api.github.com' )
547
555
. get ( '/repos/pkgjs/detect-node-support/contents/package.json' )
548
556
. reply ( 404 )
557
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
558
+ . reply ( 404 )
549
559
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
550
560
. reply ( 200 , {
551
561
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -560,6 +570,8 @@ describe('detect-node-support', () => {
560
570
Nock ( 'https://api.github.com' )
561
571
. get ( '/repos/pkgjs/detect-node-support/contents/package.json' )
562
572
. reply ( 500 )
573
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
574
+ . reply ( 404 )
563
575
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
564
576
. reply ( 200 , {
565
577
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -601,6 +613,8 @@ describe('detect-node-support', () => {
601
613
'x-ratelimit-remaining' : '0' ,
602
614
'x-ratelimit-reset' : `${ Math . round ( Date . now ( ) / 1000 ) + 1 } `
603
615
} )
616
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
617
+ . reply ( 404 )
604
618
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
605
619
. reply ( 200 , {
606
620
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -635,6 +649,8 @@ describe('detect-node-support', () => {
635
649
. reply ( 200 , {
636
650
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
637
651
} )
652
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
653
+ . reply ( 404 )
638
654
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
639
655
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
640
656
. reply ( 403 , 'You have exceeded a secondary rate limit' ) ;
@@ -659,6 +675,8 @@ describe('detect-node-support', () => {
659
675
. reply ( 200 , {
660
676
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
661
677
} )
678
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
679
+ . reply ( 404 )
662
680
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
663
681
. reply ( 200 , {
664
682
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -700,6 +718,8 @@ describe('detect-node-support', () => {
700
718
. reply ( 200 , {
701
719
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
702
720
} )
721
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
722
+ . reply ( 404 )
703
723
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
704
724
. reply ( 404 ) ;
705
725
@@ -785,6 +805,8 @@ describe('detect-node-support', () => {
785
805
. reply ( 200 , {
786
806
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
787
807
} )
808
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
809
+ . reply ( 404 )
788
810
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
789
811
. reply ( 200 , {
790
812
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -829,6 +851,8 @@ describe('detect-node-support', () => {
829
851
. reply ( 200 , {
830
852
content : Buffer . from ( JSON . stringify ( { name : 'something-else' } ) ) . toString ( 'base64' )
831
853
} )
854
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
855
+ . reply ( 404 )
832
856
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
833
857
. reply ( 200 , {
834
858
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -879,6 +903,8 @@ describe('detect-node-support', () => {
879
903
. reply ( 200 , {
880
904
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
881
905
} )
906
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
907
+ . reply ( 404 )
882
908
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
883
909
. reply ( 200 , {
884
910
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -916,6 +942,8 @@ describe('detect-node-support', () => {
916
942
. reply ( 200 , {
917
943
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
918
944
} )
945
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
946
+ . reply ( 404 )
919
947
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
920
948
. reply ( 200 , {
921
949
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -953,6 +981,8 @@ describe('detect-node-support', () => {
953
981
. reply ( 200 , {
954
982
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
955
983
} )
984
+ . get ( '/repos/pkgjs/detect-node-support/contents/.github%2Fworkflows' )
985
+ . reply ( 404 )
956
986
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
957
987
. reply ( 200 , {
958
988
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -994,6 +1024,8 @@ describe('detect-node-support', () => {
994
1024
. reply ( 200 , {
995
1025
content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'hapi-package.json' ) ) . toString ( 'base64' )
996
1026
} )
1027
+ . get ( '/repos/hapijs/hapi/contents/.github%2Fworkflows' )
1028
+ . reply ( 404 )
997
1029
. get ( '/repos/hapijs/hapi/contents/.travis.yml' )
998
1030
. reply ( 200 , {
999
1031
content : Fs . readFileSync ( Path . join ( __dirname , '..' , '.travis.yml' ) ) . toString ( 'base64' )
@@ -1046,34 +1078,47 @@ describe('detect-node-support', () => {
1046
1078
. reply ( 200 , Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'packuments' , 'rimraf.json' ) ) ) ;
1047
1079
1048
1080
Nock ( 'https://api.github.com' )
1081
+
1049
1082
. get ( '/repos/watson/is-ci/contents/package.json' )
1050
1083
. reply ( 200 , {
1051
1084
content : Buffer . from ( JSON . stringify ( { name : 'is-ci' , version : '2.0.0' } ) ) . toString ( 'base64' )
1052
1085
} )
1086
+ . get ( '/repos/watson/is-ci/contents/.github%2Fworkflows' )
1087
+ . reply ( 404 )
1053
1088
. get ( '/repos/watson/is-ci/contents/.travis.yml' )
1054
1089
. reply ( 200 , {
1055
1090
content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'travis-ymls' , 'testing-single-version.yml' ) ) . toString ( 'base64' )
1056
1091
} )
1092
+
1057
1093
. get ( '/repos/watson/ci-info/contents/package.json' )
1058
1094
. reply ( 200 , {
1059
1095
content : Buffer . from ( JSON . stringify ( { name : 'ci-info' , version : '2.0.0' } ) ) . toString ( 'base64' )
1060
1096
} )
1097
+ . get ( '/repos/watson/ci-info/contents/.github%2Fworkflows' )
1098
+ . reply ( 404 )
1061
1099
. get ( '/repos/watson/ci-info/contents/.travis.yml' )
1062
1100
. reply ( 200 , {
1063
1101
content : Fs . readFileSync ( Path . join ( __dirname , 'fixtures' , 'travis-ymls' , 'testing-single-version.yml' ) ) . toString ( 'base64' )
1064
1102
} )
1103
+
1065
1104
. get ( '/repos/visionmedia/debug/contents/package.json' )
1066
1105
. reply ( 200 , {
1067
1106
content : Buffer . from ( JSON . stringify ( { name : 'debug' , version : '4.1.1' } ) ) . toString ( 'base64' )
1068
1107
} )
1108
+ . get ( '/repos/visionmedia/debug/contents/.github%2Fworkflows' )
1109
+ . reply ( 404 )
1069
1110
. get ( '/repos/visionmedia/debug/contents/.travis.yml' )
1070
1111
. reply ( 404 )
1112
+
1071
1113
. get ( '/repos/zeit/ms/contents/package.json' )
1072
1114
. reply ( 200 , {
1073
1115
content : Buffer . from ( JSON . stringify ( { name : 'ms' , version : '2.1.2' } ) ) . toString ( 'base64' )
1074
1116
} )
1117
+ . get ( '/repos/zeit/ms/contents/.github%2Fworkflows' )
1118
+ . reply ( 404 )
1075
1119
. get ( '/repos/zeit/ms/contents/.travis.yml' )
1076
1120
. reply ( 404 )
1121
+
1077
1122
. get ( '/repos/isaacs/rimraf/contents/package.json' )
1078
1123
. reply ( 404 ) ;
1079
1124
} ) ;
0 commit comments