From 7e0f21e4223a4e35164e8fe8e585e6999b1bcc07 Mon Sep 17 00:00:00 2001 From: Ushie Date: Mon, 26 Dec 2022 21:23:22 +0300 Subject: [PATCH] feat(contributors): show contributions count --- app/controllers/Releases.py | 2 +- app/models/ResponseFields.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/Releases.py b/app/controllers/Releases.py index 03d438c..8bc779b 100644 --- a/app/controllers/Releases.py +++ b/app/controllers/Releases.py @@ -109,7 +109,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") diff --git a/app/models/ResponseFields.py b/app/models/ResponseFields.py index 62beaa4..c663c09 100644 --- a/app/models/ResponseFields.py +++ b/app/models/ResponseFields.py @@ -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