From c8ef0e49bee29a966f9da20b9d8c37d73d9e90d8 Mon Sep 17 00:00:00 2001 From: Anmol Singh Date: Sat, 25 Feb 2023 01:20:33 +0530 Subject: [PATCH] fix: added private label to user's private repository while logging --- sources/manager_download.py | 1 + sources/yearly_commit_calculator.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/manager_download.py b/sources/manager_download.py index 59858ed3..05056444 100644 --- a/sources/manager_download.py +++ b/sources/manager_download.py @@ -69,6 +69,7 @@ owner { login } + isPrivate } pageInfo { endCursor diff --git a/sources/yearly_commit_calculator.py b/sources/yearly_commit_calculator.py index d93c3651..f9a898f9 100644 --- a/sources/yearly_commit_calculator.py +++ b/sources/yearly_commit_calculator.py @@ -21,7 +21,8 @@ async def calculate_yearly_commit_data(repositories: Dict) -> Dict: total = len(repositories["data"]["user"]["repositories"]["nodes"]) for ind, repo in enumerate(repositories["data"]["user"]["repositories"]["nodes"]): if repo["name"] not in EM.IGNORED_REPOS: - DBM.i(f"\t{ind + 1}/{total} Retrieving repo: {repo['owner']['login']}/{repo['name']}") + repo_name = "private" if repo["isPrivate"] else repo['owner']['login'] + "/" + repo['name'] + DBM.i(f"\t{ind + 1}/{total} Retrieving repo: {repo_name}") await update_yearly_data_with_commit_stats(repo, yearly_data) DBM.g("Yearly commit data calculated!") return yearly_data