mirror of
https://github.com/mustbeperfect/definitive-opensource.git
synced 2026-04-18 02:54:13 +02:00
Updated script to account for rebranded projects
This commit is contained in:
@@ -18,6 +18,7 @@ with open(INPUT_FILE, "r") as f:
|
|||||||
potentially_abandoned = []
|
potentially_abandoned = []
|
||||||
archived = []
|
archived = []
|
||||||
no_longer_exists = []
|
no_longer_exists = []
|
||||||
|
rebranded = []
|
||||||
|
|
||||||
# Check if projects are abandoned, archived, or no longer exist
|
# Check if projects are abandoned, archived, or no longer exist
|
||||||
for app in data.get("applications", []):
|
for app in data.get("applications", []):
|
||||||
@@ -44,6 +45,13 @@ for app in data.get("applications", []):
|
|||||||
|
|
||||||
repo_data = r.json()
|
repo_data = r.json()
|
||||||
|
|
||||||
|
current_full_name = repo_data.get("full_name", "")
|
||||||
|
expected_full_name = f"{owner}/{repo}"
|
||||||
|
|
||||||
|
if current_full_name.lower() != expected_full_name.lower():
|
||||||
|
new_url = repo_data.get("html_url", "Unknown URL")
|
||||||
|
rebranded.append(f"{app['name']} (Moved to: {new_url})")
|
||||||
|
|
||||||
if repo_data.get("archived"):
|
if repo_data.get("archived"):
|
||||||
archived.append(app["name"])
|
archived.append(app["name"])
|
||||||
continue
|
continue
|
||||||
@@ -74,11 +82,18 @@ with open(OUTPUT_FILE, "w") as f:
|
|||||||
else:
|
else:
|
||||||
f.write("_None_\n")
|
f.write("_None_\n")
|
||||||
|
|
||||||
f.write("\n## No Longer Exists:\n")
|
f.write("\n## No Longer Exists (404):\n")
|
||||||
if no_longer_exists:
|
if no_longer_exists:
|
||||||
for name in no_longer_exists:
|
for name in no_longer_exists:
|
||||||
f.write(f"- {name}\n")
|
f.write(f"- {name}\n")
|
||||||
else:
|
else:
|
||||||
f.write("_None_\n")
|
f.write("_None_\n")
|
||||||
|
|
||||||
|
f.write("\n## Rebranded / Moved:\n")
|
||||||
|
if rebranded:
|
||||||
|
for item in rebranded:
|
||||||
|
f.write(f"- {item}\n")
|
||||||
|
else:
|
||||||
|
f.write("_None_\n")
|
||||||
|
|
||||||
print(f"{OUTPUT_FILE} Complete")
|
print(f"{OUTPUT_FILE} Complete")
|
||||||
|
|||||||
Reference in New Issue
Block a user