Skip to content

Commit

Permalink
chore: review feedback - rename variable
Browse files Browse the repository at this point in the history
Signed-off-by: jmeridth <[email protected]>
Co-authored-by: Zack Koppert <[email protected]>
  • Loading branch information
jmeridth and zkoppert committed Feb 29, 2024
1 parent 6ed392d commit 2c543b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions stale_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ def get_inactive_repos(github_connection, inactive_days_threshold, organization)

active_date_disp = active_date.date().isoformat()
days_inactive = (datetime.now(timezone.utc) - active_date).days
private = "private" if repo.private else "public"
visibility = "private" if repo.private else "public"
if days_inactive > int(inactive_days_threshold) and not repo.archived:
inactive_repos.append(
(repo.html_url, days_inactive, active_date_disp, private)
(repo.html_url, days_inactive, active_date_disp, visibility)
)
print(f"{repo.html_url}: {days_inactive} days inactive") # type: ignore
if organization:
Expand Down Expand Up @@ -197,9 +197,9 @@ def write_to_markdown(inactive_repos, inactive_days_threshold, file=None):
)
file.write("| Repository URL | Days Inactive | Last Push Date | Visibility |\n")
file.write("| --- | --- | --- | ---: |\n")
for repo_url, days_inactive, last_push_date, private in inactive_repos:
for repo_url, days_inactive, last_push_date, visibility in inactive_repos:
file.write(
f"| {repo_url} | {days_inactive} | {last_push_date} | {private} |\n"
f"| {repo_url} | {days_inactive} | {last_push_date} | {visibility} |\n"
)
print("Wrote stale repos to stale_repos.md")

Expand All @@ -225,13 +225,13 @@ def output_to_json(inactive_repos, file=None):
# }
# ]
inactive_repos_json = []
for repo_url, days_inactive, last_push_date, private in inactive_repos:
for repo_url, days_inactive, last_push_date, visibility in inactive_repos:
inactive_repos_json.append(
{
"url": repo_url,
"daysInactive": days_inactive,
"lastPushDate": last_push_date,
"visibility": private,
"visibility": visibility,
}
)
inactive_repos_json = json.dumps(inactive_repos_json)
Expand Down

0 comments on commit 2c543b5

Please sign in to comment.