Skip to content

Commit

Permalink
Merge pull request #2632 from knowshan/i-2574
Browse files Browse the repository at this point in the history
chore(krel): update CLI message for GITHUB_TOKEN #2574
  • Loading branch information
k8s-ci-robot authored Aug 13, 2022
2 parents dfeb9af + 40903a9 commit 9182fc7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/krel/cmd/release_notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ func (o *releaseNotesOptions) Validate() error {
// Check that we have a GitHub token set
token, isset := os.LookupEnv(github.TokenEnvKey)
if !isset || token == "" {
return errors.New("cannot generate release notes if GitHub token is not set")
return fmt.Errorf("cannot generate release notes if %s env variable is not set", github.TokenEnvKey)
}

// If a tag is defined, see if it is a valid semver tag
Expand Down
2 changes: 1 addition & 1 deletion cmd/krel/cmd/testgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (o *TestGridOptions) Validate() error {
if o.gitHubIssue != -1 {
token, isSet := os.LookupEnv(github.TokenEnvKey)
if !isSet || token == "" {
return errors.New("cannot send the screenshots if GitHub token is not set")
return fmt.Errorf("cannot send the screenshots if %s environment variable is not set", github.TokenEnvKey)
}

gh := github.New()
Expand Down
2 changes: 1 addition & 1 deletion pkg/notes/notes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
func githubClient(t *testing.T) (kgithub.Client, context.Context) {
_, tokenSet := os.LookupEnv(kgithub.TokenEnvKey)
if !tokenSet {
t.Skipf("%s is not set", kgithub.TokenEnvKey)
t.Skipf("%s environment variable is not set", kgithub.TokenEnvKey)
}

c := kgithub.New()
Expand Down

0 comments on commit 9182fc7

Please sign in to comment.