()
| 22 | ) |
| 23 | |
| 24 | func init() { |
| 25 | token := os.Getenv("GH_SECURITY_AUDITOR_TOKEN") |
| 26 | if token == "" { |
| 27 | client = github.NewClient(nil) |
| 28 | } else { |
| 29 | tc := oauth2.NewClient(context.Background(), oauth2.StaticTokenSource( |
| 30 | &oauth2.Token{AccessToken: token}, |
| 31 | )) |
| 32 | client = github.NewClient(tc) |
| 33 | auth = true |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func TestSampleOrg(t *testing.T) { |
| 38 | auditor := &GithubAuditor{client: client} |
nothing calls this directly
no outgoing calls
no test coverage detected