From fa55eff2861279df0cbf94fd26fecd21d09863c0 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Thu, 28 Mar 2019 16:54:04 -0400 Subject: [PATCH] Correcting how the graphql connection is obtained --- .../Services/PullRequestSessionService.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs b/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs index d4721b0cd1..cafb0194ef 100644 --- a/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs +++ b/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs @@ -716,7 +716,7 @@ public async Task GetGraphQLPullRequestId( string repositoryOwner, int number) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var query = new Query() @@ -775,7 +775,7 @@ public async Task CreatePendingReview( LocalRepositoryModel localRepository, string pullRequestId) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var (_, owner, number) = await CreatePendingReviewCore(localRepository, pullRequestId); var detail = await ReadPullRequestDetail(address, owner, localRepository.Name, number); @@ -790,7 +790,7 @@ public async Task CancelPendingReview( LocalRepositoryModel localRepository, string reviewId) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var delete = new DeletePullRequestReviewInput @@ -818,7 +818,7 @@ public async Task PostReview( string body, PullRequestReviewEvent e) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var addReview = new AddPullRequestReviewInput @@ -848,7 +848,7 @@ public async Task SubmitPendingReview( string body, PullRequestReviewEvent e) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var submit = new SubmitPullRequestReviewInput @@ -880,7 +880,7 @@ public async Task PostPendingReviewComment( string path, int position) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var comment = new AddPullRequestReviewCommentInput @@ -912,7 +912,7 @@ public async Task PostPendingReviewCommentReply( string body, string inReplyTo) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var comment = new AddPullRequestReviewCommentInput @@ -944,7 +944,7 @@ public async Task PostStandaloneReviewComment( string path, int position) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var addReview = new AddPullRequestReviewInput @@ -995,7 +995,7 @@ public async Task DeleteComment( int pullRequestId, int commentDatabaseId) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var apiClient = await apiClientFactory.Create(address); await apiClient.DeletePullRequestReviewComment( @@ -1013,7 +1013,7 @@ public async Task EditComment(LocalRepositoryModel local string commentNodeId, string body) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var updatePullRequestReviewCommentInput = new UpdatePullRequestReviewCommentInput @@ -1036,7 +1036,7 @@ public async Task EditComment(LocalRepositoryModel local async Task<(string id, string owner, int number)> CreatePendingReviewCore(LocalRepositoryModel localRepository, string pullRequestId) { - var address = HostAddress.Create(localRepository.CloneUrl.Host); + var address = HostAddress.Create(localRepository.CloneUrl); var graphql = await graphqlFactory.CreateConnection(address); var input = new AddPullRequestReviewInput