mirror of
https://github.com/JonasunderscoreJones/turbo-octo-potato.git
synced 2025-10-25 11:09:18 +02:00
Changed projects sort to last commit
This commit is contained in:
parent
1351efd08a
commit
7b3577206f
1 changed files with 3 additions and 1 deletions
|
|
@ -106,6 +106,8 @@ for project in projects_data:
|
||||||
last_release_version = get_last_release_version(gh_api, GITHUB_API_TOKEN)
|
last_release_version = get_last_release_version(gh_api, GITHUB_API_TOKEN)
|
||||||
if last_commit_timestamp:
|
if last_commit_timestamp:
|
||||||
project["last_update"] = last_commit_timestamp
|
project["last_update"] = last_commit_timestamp
|
||||||
|
else:
|
||||||
|
project["last_update"] = 0
|
||||||
if last_release_version:
|
if last_release_version:
|
||||||
project["version"] = last_release_version.replace("v", "")
|
project["version"] = last_release_version.replace("v", "")
|
||||||
languages = get_languagages(gh_api, GITHUB_API_TOKEN)
|
languages = get_languagages(gh_api, GITHUB_API_TOKEN)
|
||||||
|
|
@ -113,7 +115,7 @@ for project in projects_data:
|
||||||
project["languages"] = languages
|
project["languages"] = languages
|
||||||
|
|
||||||
# sort projects alphabetically
|
# sort projects alphabetically
|
||||||
projects_data = sorted(projects_data, key=lambda x: x["title"])
|
projects_data = sorted(projects_data, key=lambda x: x['last_update'], reverse=True)
|
||||||
|
|
||||||
# Save the updated data back to the projects.json file
|
# Save the updated data back to the projects.json file
|
||||||
with open(projects_json_path, "w") as file:
|
with open(projects_json_path, "w") as file:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue