Skip to content

Commit

Permalink
Remove envToken
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <[email protected]>
  • Loading branch information
KeisukeYamashita committed Feb 20, 2022
1 parent 13d4a8b commit e5e8b67
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions notifier/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 0 additions & 8 deletions notifier/github/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e5e8b67

Please sign in to comment.