diff --git a/notifier/github/client.go b/notifier/github/client.go index ef1f288..094e23d 100644 --- a/notifier/github/client.go +++ b/notifier/github/client.go @@ -10,9 +10,6 @@ import ( "golang.org/x/oauth2" ) -// EnvToken is GitHub API Token -const EnvToken = "GITHUB_TOKEN" - // EnvBaseURL is GitHub base URL. This can be set to a domain endpoint to use with GitHub Enterprise. const EnvBaseURL = "GITHUB_BASE_URL" diff --git a/notifier/github/client_test.go b/notifier/github/client_test.go index d59c48c..79036d3 100644 --- a/notifier/github/client_test.go +++ b/notifier/github/client_test.go @@ -7,12 +7,6 @@ import ( ) func TestNewClient(t *testing.T) { - githubToken := os.Getenv(EnvToken) - defer func() { - os.Setenv(EnvToken, githubToken) - }() - os.Setenv(EnvToken, "") - testCases := []struct { config Config envToken string @@ -77,8 +71,6 @@ func TestNewClient(t *testing.T) { if strings.HasPrefix(testCase.config.Token, "$") { key := strings.TrimPrefix(testCase.config.Token, "$") os.Setenv(key, testCase.envToken) - } else { - os.Setenv(EnvToken, testCase.envToken) } _, err := NewClient(testCase.config)