Merge pull request #49 from Ushie/feat/contributors/contributions

feat(contributors): show contributions count
This commit is contained in:
Alexandre Teles 2022-12-26 18:01:08 -03:00 committed by GitHub
commit 46248cd2e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class Releases:
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")

View File

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