Before:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
could not find hosts config: not found
Now:
$ GH_ENTERPRISE_TOKEN="..." gh pr create
set the GH_HOST environment variable to specify which GitHub host to use
Also amends `gh help environment` documentation to suggest the use of
GH_HOST when scripting operations with GitHub Enterprise repositories.
15 lines
271 B
Go
15 lines
271 B
Go
package config
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_fileConfig_Hosts(t *testing.T) {
|
|
c := NewBlankConfig()
|
|
hosts, err := c.Hosts()
|
|
require.NoError(t, err)
|
|
assert.Equal(t, []string{}, hosts)
|
|
}
|