INNER CODE UNIT · Python
most_recent_releases
simonw/simonw · build_readme.py:356
def most_recent_releases(cache):
"""Extract the most recent release per repo from the cache, for display."""
releases = []
for repo_data in cache.values():
if not repo_data["releases"]:
continue
latest = repo_data["releases"][0]
releases.append(
{
"repo": repo_data["repo"],
"repo_url": repo_data["repo_url"],
"description": repo_data["description"],
"total_releases": repo_data["total_releases"],
**latest,
}
)
return releases