Skip to content

Commit

Permalink
update(readme): add steps for configuring tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JehandadK committed Jun 15, 2021
1 parent 08502a4 commit be0a17b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $ go get -u github.com/tcnksm/ghr
2. Create a feature branch
3. Commit your changes
4. Rebase your local changes against the master branch
5. Run test suite with the `make test` command and confirm that it passes
5. Run test suite with the `make test` command and confirm that it passes using correct variables e.g. `GITHUB_TOKEN=$GITHUB_TOKEN TEST_REPO_OWNER=tcnksm TEST_REPO_NAME=ghr make test`
6. Run `gofmt -s -w .`
7. Create new Pull Request

Expand Down
6 changes: 2 additions & 4 deletions github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ var (
)

func TestMain(m *testing.M) {
owner := os.Getenv(EnvRepoOwner)
if owner != "" {
if owner := os.Getenv(EnvRepoOwner); owner != "" {
TestOwner = owner
}

repo := os.Getenv(EnvRepoName)
if repo != "" {
if repo := os.Getenv(EnvRepoName); repo != "" {
TestRepo = repo
}

Expand Down

0 comments on commit be0a17b

Please sign in to comment.