X Tutup
Skip to content

Commit c1c836a

Browse files
committed
Remove hardcoded "github.com"
1 parent 0cbcf8a commit c1c836a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

api/queries_repo.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ func RepoCreate(client *Client, input RepoCreateInput) (*Repository, error) {
386386
}
387387

388388
// TODO: GHE support
389-
err := client.GraphQL(ghinstance.Default(), `
389+
hostname := ghinstance.Default()
390+
391+
err := client.GraphQL(hostname, `
390392
mutation RepositoryCreate($input: CreateRepositoryInput!) {
391393
createRepository(input: $input) {
392394
repository {
@@ -402,8 +404,7 @@ func RepoCreate(client *Client, input RepoCreateInput) (*Repository, error) {
402404
return nil, err
403405
}
404406

405-
// FIXME: support Enterprise hosts
406-
return initRepoHostname(&response.CreateRepository.Repository, "github.com"), nil
407+
return initRepoHostname(&response.CreateRepository.Repository, hostname), nil
407408
}
408409

409410
type RepoMetadataResult struct {

0 commit comments

Comments
 (0)
X Tutup