Fix Theme Metadata Duplication and Add Missing Properties for Recent Pull Requests (#575)

* fix ability to add tags multiple times when rebuilding themes

* fix `createdAt` not being added for pull requests made prior

* adds tags property if it doesn't exist (old PRs)

* updated affected `theme.json` files

* updated more affected `theme.json` files

* fix action failing if new commits before finished

* make action only initiate when themes are changed
This commit is contained in:
TheRealMG 2024-10-13 02:59:29 -05:00 committed by GitHub
parent 65c8c1fed0
commit a73edd785e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 53 additions and 14 deletions

View file

@ -75,11 +75,12 @@ def main():
if "tags" not in theme_data:
theme_data["tags"] = []
# Add 'color theme' tag if colors.json is present
theme_data["tags"].append("color theme")
# Add 'color theme' tag if colors.json is present and tag isn't already in tags list
if "color scheme" not in theme_data["tags"]:
theme_data["tags"].append("color scheme")
# Add 'dark' tag if colors.json specifies dark mode
if "isDarkMode" in colors and colors["isDarkMode"]:
# Add 'dark' tag if colors.json specifies dark mode and tag isn't already in tags list
if "isDarkMode" in colors and colors["isDarkMode"] and "dark" not in theme_data["tags"]:
theme_data["tags"].append("dark")
themes_data[theme] = theme_data