@@ -14,17 +14,15 @@ testuser_sshkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVDBxFza4BmQTCTFeTyK"*
14
14
15
15
hasghobj (obj, items) = any (x -> name (x) == name (obj), items)
16
16
17
- # This token has public, read-only access, and is required so that our
18
- # tests don't get rate-limited. The only way a malicious party could do harm
19
- # with this token is if they used it to abuse the rate limit associated with
20
- # the token (not too big of a deal). The token is hard-coded in an obsfucated
21
- # manner in an attempt to thwart token-stealing crawlers.
22
- auth = authenticate (string (circshift ([" bcc" , " 3fc" , " 03a" , " 33e" ,
23
- " c09" , " 363" , " 5f1" , " bd3" ,
24
- " fc6" , " 77b" , ' 5' , " 9cf" ,
25
- " 868" , " 033" ], 3 )... ))
26
-
27
- @test rate_limit (; auth = auth)[" rate" ][" limit" ] == 5000
17
+ if haskey (ENV , " GITHUB_TOKEN" )
18
+ @info " Using GitHub token from ENV"
19
+ auth = authenticate (ENV [" GITHUB_TOKEN" ])
20
+ @test rate_limit (; auth = auth)[" rate" ][" limit" ] == 5000
21
+ else
22
+ @warn " Using anonymous GitHub access. If you get rate-limited, please set the GITHUB_TOKEN env var to an appropriate value."
23
+ auth = GitHub. AnonymousAuth ()
24
+ @test rate_limit (; auth = auth)[" rate" ][" limit" ] == 60
25
+ end
28
26
29
27
@testset " Owners" begin
30
28
# test GitHub.owner
0 commit comments