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

Updating to the latest Octokit.GraphQL #2019

Merged
merged 6 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/GitHub.App/Services/PullRequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
if (readPullRequests == null)
{
readPullRequests = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.PullRequests(
first: 100,
after: Var(nameof(after)),
Expand Down Expand Up @@ -151,7 +151,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
if (readPullRequestsEnterprise == null)
{
readPullRequestsEnterprise = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.PullRequests(
first: 100,
after: Var(nameof(after)),
Expand Down Expand Up @@ -292,7 +292,7 @@ public async Task<Page<ActorModel>> ReadAssignableUsers(
if (readAssignableUsers == null)
{
readAssignableUsers = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.AssignableUsers(first: 100, after: Var(nameof(after)))
.Select(connection => new Page<ActorModel>
{
Expand Down
4 changes: 2 additions & 2 deletions src/GitHub.App/Services/RepositoryCloneService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public async Task<ViewerRepositoriesModel> ReadViewerRepositories(HostAddress ad
.Select(viewer => new ViewerRepositoriesModel
{
Owner = viewer.Login,
Repositories = viewer.Repositories(null, null, null, null, null, order, affiliation, null, null)
Repositories = viewer.Repositories(null, null, null, null, null, null, null, order, affiliation, null)
.AllPages()
.Select(repositorySelection).ToList(),
Organizations = viewer.Organizations(null, null, null, null).AllPages().Select(org => new
{
org.Login,
Repositories = org.Repositories(null, null, null, null, null, order, null, null, null)
Repositories = org.Repositories(null, null, null, null, null, null, null, order, null, null)
.AllPages()
.Select(repositorySelection).ToList()
}).ToDictionary(x => x.Login, x => (IReadOnlyList<RepositoryListItemModel>)x.Repositories),
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub.App/Services/RepositoryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public RepositoryService(IGraphQLClientFactory graphqlFactory)
if (readParentOwnerLogin == null)
{
readParentOwnerLogin = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.Select(r => r.Parent != null ? Tuple.Create(r.Parent.Owner.Login, r.Parent.Name) : null)
.Compile();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public virtual async Task<PullRequestDetailModel> ReadPullRequestDetail(HostAddr
if (readPullRequest == null)
{
readPullRequest = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.PullRequest(Var(nameof(number)))
.Select(pr => new PullRequestDetailModel
{
Expand Down Expand Up @@ -416,7 +416,7 @@ public async Task<string> GetGraphQLPullRequestId(
var graphql = await graphqlFactory.CreateConnection(address);

var query = new Query()
.Repository(repositoryOwner, localRepository.Name)
.Repository(owner: repositoryOwner, name: localRepository.Name)
.PullRequest(number)
.Select(x => x.Id);

Expand Down Expand Up @@ -781,7 +781,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
if (readCommitStatuses == null)
{
readCommitStatuses = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.PullRequest(Var(nameof(number))).Commits(last: 1).Nodes.Select(
commit => new LastCommitAdapter
{
Expand Down Expand Up @@ -833,7 +833,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
if (readCommitStatusesEnterprise == null)
{
readCommitStatusesEnterprise = new Query()
.Repository(Var(nameof(owner)), Var(nameof(name)))
.Repository(owner: Var(nameof(owner)), name: Var(nameof(name)))
.PullRequest(Var(nameof(number))).Commits(last: 1).Nodes.Select(
commit => new LastCommitAdapter
{
Expand Down
2 changes: 1 addition & 1 deletion submodules/octokit.graphql.net