From c1c836a657b735a6581aa70819d269d0cf453caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Mon, 27 Jul 2020 16:31:05 +0200 Subject: [PATCH] Remove hardcoded "github.com" --- api/queries_repo.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/queries_repo.go b/api/queries_repo.go index 745f06623..4aa5cf02e 100644 --- a/api/queries_repo.go +++ b/api/queries_repo.go @@ -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 {