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

Commit 5513a46

Browse files
Changing how Repository is called
1 parent 1810c47 commit 5513a46

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/GitHub.App/Services/PullRequestService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
9090
if (readPullRequests == null)
9191
{
9292
readPullRequests = new Query()
93-
.Repository(Var(nameof(owner)), Var(nameof(name)))
93+
.Repository(Var(nameof(name)), Var(nameof(owner)))
9494
.PullRequests(
9595
first: 100,
9696
after: Var(nameof(after)),
@@ -151,7 +151,7 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
151151
if (readPullRequestsEnterprise == null)
152152
{
153153
readPullRequestsEnterprise = new Query()
154-
.Repository(Var(nameof(owner)), Var(nameof(name)))
154+
.Repository(Var(nameof(name)), Var(nameof(owner)))
155155
.PullRequests(
156156
first: 100,
157157
after: Var(nameof(after)),
@@ -290,7 +290,7 @@ public async Task<Page<ActorModel>> ReadAssignableUsers(
290290
if (readAssignableUsers == null)
291291
{
292292
readAssignableUsers = new Query()
293-
.Repository(Var(nameof(owner)), Var(nameof(name)))
293+
.Repository(Var(nameof(name)), Var(nameof(owner)))
294294
.AssignableUsers(first: 100, after: Var(nameof(after)))
295295
.Select(connection => new Page<ActorModel>
296296
{

src/GitHub.App/Services/RepositoryService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public RepositoryService(IGraphQLClientFactory graphqlFactory)
3434
if (readParentOwnerLogin == null)
3535
{
3636
readParentOwnerLogin = new Query()
37-
.Repository(Var(nameof(owner)), Var(nameof(name)))
37+
.Repository(Var(nameof(name)), Var(nameof(owner)))
3838
.Select(r => r.Parent != null ? Tuple.Create(r.Parent.Owner.Login, r.Parent.Name) : null)
3939
.Compile();
4040
}

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public virtual async Task<PullRequestDetailModel> ReadPullRequestDetail(HostAddr
283283
if (readPullRequest == null)
284284
{
285285
readPullRequest = new Query()
286-
.Repository(Var(nameof(owner)), Var(nameof(name)))
286+
.Repository(Var(nameof(name)), Var(nameof(owner)))
287287
.PullRequest(Var(nameof(number)))
288288
.Select(pr => new PullRequestDetailModel
289289
{
@@ -395,7 +395,7 @@ public async Task<string> GetGraphQLPullRequestId(
395395
var graphql = await graphqlFactory.CreateConnection(address);
396396

397397
var query = new Query()
398-
.Repository(repositoryOwner, localRepository.Name)
398+
.Repository(localRepository.Name, repositoryOwner)
399399
.PullRequest(number)
400400
.Select(x => x.Id);
401401

@@ -760,7 +760,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
760760
if (readCommitStatuses == null)
761761
{
762762
readCommitStatuses = new Query()
763-
.Repository(Var(nameof(owner)), Var(nameof(name)))
763+
.Repository(Var(nameof(name)), Var(nameof(owner)))
764764
.PullRequest(Var(nameof(number))).Commits(last: 1).Nodes.Select(
765765
commit => new LastCommitAdapter
766766
{
@@ -798,7 +798,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
798798
if (readCommitStatusesEnterprise == null)
799799
{
800800
readCommitStatusesEnterprise = new Query()
801-
.Repository(Var(nameof(owner)), Var(nameof(name)))
801+
.Repository(Var(nameof(name)), Var(nameof(owner)))
802802
.PullRequest(Var(nameof(number))).Commits(last: 1).Nodes.Select(
803803
commit => new LastCommitAdapter
804804
{

0 commit comments

Comments
 (0)