Remove hardcoded "github.com"
This commit is contained in:
parent
0cbcf8a7fa
commit
c1c836a657
1 changed files with 4 additions and 3 deletions
|
|
@ -386,7 +386,9 @@ func RepoCreate(client *Client, input RepoCreateInput) (*Repository, error) {
|
|||
}
|
||||
|
||||
// TODO: GHE support
|
||||
err := client.GraphQL(ghinstance.Default(), `
|
||||
hostname := ghinstance.Default()
|
||||
|
||||
err := client.GraphQL(hostname, `
|
||||
mutation RepositoryCreate($input: CreateRepositoryInput!) {
|
||||
createRepository(input: $input) {
|
||||
repository {
|
||||
|
|
@ -402,8 +404,7 @@ func RepoCreate(client *Client, input RepoCreateInput) (*Repository, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// FIXME: support Enterprise hosts
|
||||
return initRepoHostname(&response.CreateRepository.Repository, "github.com"), nil
|
||||
return initRepoHostname(&response.CreateRepository.Repository, hostname), nil
|
||||
}
|
||||
|
||||
type RepoMetadataResult struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue