feat(contributors): show contributions count

This commit is contained in:
Ushie 2022-12-26 21:23:22 +03:00
parent 7a6cde4fe3
commit 7e0f21e422
No known key found for this signature in database
GPG Key ID: 0EF73F1CA38B2D5F
2 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class Releases:
list: a list of dictionaries containing the repository's contributors list: a list of dictionaries containing the repository's contributors
""" """
keep: set = {'login', 'avatar_url', 'html_url'} keep: set = {'login', 'avatar_url', 'html_url', 'contributions'}
response = await self.httpx_client.get(f"https://api.github.com/repos/{repository}/contributors") response = await self.httpx_client.get(f"https://api.github.com/repos/{repository}/contributors")

View File

@ -53,6 +53,7 @@ class ContributorFields(BaseModel):
login: str login: str
avatar_url: str avatar_url: str
html_url: str html_url: str
contributions: int
class ContributorsResponseFields(BaseModel): class ContributorsResponseFields(BaseModel):
"""Implements the fields for each repository in the /contributors endpoint """Implements the fields for each repository in the /contributors endpoint