github4s icon indicating copy to clipboard operation
github4s copied to clipboard

Github4s not returning complete information about members of an organization

Open muunaar opened this issue 5 years ago • 3 comments

I'm working with Github4s in order to retrieve the list of members of an organization name given. I'm using v3 I'm getting the result as follows : User(1550710,tues,https://avatars3.githubusercontent.com/u/1550710?v=4,https://github.com/tues,None,None,None,None,None,None,Some(https://api.github.com/users/tues/followers),Some(https://api.github.com/users/tues/following{/other_user}),User,None,None,None)

Can someone enlighten me

muunaar avatar Nov 06 '20 15:11 muunaar

Which part needs enlightening?

BenFradet avatar Nov 09 '20 16:11 BenFradet

The Organization API, the first function that consists of returning the members of the organization with their related contributions. If I did understand, the getmembers should return the members of the organization with their associated number of contributions When I use it, the returned User(..) consists of plenty of None value for the contribution fields. Therefore, the developer should use the repository API as well as the Organization API to get the needed data.

muunaar avatar Nov 16 '20 09:11 muunaar

@muunaar That is correct. The GitHub API does not specify the contributions field as something that can be returned from this endpoint, but it shares a lot of overlap so we are reusing a common case class. Not all of the fields will be populated by every API request so it might seem misleading from the usage point of the library, but it is consistent with the official API.

https://docs.github.com/en/rest/reference/orgs#list-organization-members

sloshy avatar Feb 04 '21 15:02 sloshy