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

Commit dd34b3b

Browse files
committed
Set both affiliations and ownerAffiliations
Explanation by @nicksnyder: Before this change, the affiliations field was overloaded to mean both the affiliations that the viewer had with the specified repositories, as well as the affiliations between the user that the connection was operating on. This caused a host of issues in various places, and we opted to separate them out to allow for more flexibility. In order to fix the above, the proper behavior would be to pass the full list of arguments to both connections (affiliations and ownerAffiliations), which should provide you all of the possible repositories. https://platform.github.community/t/unable-to-fetch-users-repositories-by-organization-membership/7557/6
1 parent a2eb5c2 commit dd34b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/RepositoryCloneService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public async Task<ViewerRepositoriesModel> ReadViewerRepositories(HostAddress ad
9595
.Select(viewer => new ViewerRepositoriesModel
9696
{
9797
Owner = viewer.Login,
98-
Repositories = viewer.Repositories(null, null, null, null, null, null, null, order, affiliation, null)
98+
Repositories = viewer.Repositories(null, null, null, null, affiliation, null, null, order, affiliation, null)
9999
.AllPages()
100100
.Select(repositorySelection).ToList(),
101101
ContributedToRepositories = viewer.RepositoriesContributedTo(100, null, null, null, null, null, null, order, null)

0 commit comments

Comments
 (0)