Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Passing through the call to refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Feb 28, 2019
1 parent ff484ab commit c3b597f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public virtual async Task<PullRequestDetailModel> ReadPullRequestDetail(
async () => await apiClient.GetPullRequestFiles(owner, name, number).ToList());

var lastCommitModel = await log.TimeAsync(nameof(GetPullRequestLastCommitAdapter),
() => GetPullRequestLastCommitAdapter(address, owner, name, number));
() => GetPullRequestLastCommitAdapter(address, owner, name, number, refresh));

result.Statuses = (IReadOnlyList<StatusModel>)lastCommitModel.Statuses ?? Array.Empty<StatusModel>();

Expand Down Expand Up @@ -820,7 +820,7 @@ Task<IRepository> GetRepository(LocalRepositoryModel repository)
return Task.Run(() => gitService.GetRepository(repository.LocalPath));
}

async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress address, string owner, string name, int number)
async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress address, string owner, string name, int number, bool refresh)
{
ICompiledQuery<IEnumerable<LastCommitAdapter>> query;
if (address.IsGitHubDotCom())
Expand Down Expand Up @@ -911,7 +911,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
};

var connection = await graphqlFactory.CreateConnection(address);
var result = await connection.Run(query, vars);
var result = await connection.Run(query, vars, refresh);
return result.First();
}

Expand Down

0 comments on commit c3b597f

Please sign in to comment.