mirror of
https://github.com/konpa/devicon.git
synced 2025-08-23 06:33:11 +02:00
Script upgrades and updated CONTRIBUTING.md and README.md (#576)
* Updated README and CONTRIBUTING * Added check for devicon object when peeking * Added PR template * Added a script to create release messages * Updated CONTRIBUTING about new script * Update .github/PULL_REQUEST_TEMPLATE/new_icon.md Co-authored-by: David Leal <halfpacho@gmail.com> * Update .github/scripts/build_assets/arg_getters.py Co-authored-by: David Leal <halfpacho@gmail.com> * Update .github/workflows/get_release_message.yml Co-authored-by: David Leal <halfpacho@gmail.com> * Update gulpfile.js Co-authored-by: David Leal <halfpacho@gmail.com> * Update .github/PULL_REQUEST_TEMPLATE/new_feature.md Co-authored-by: David Leal <halfpacho@gmail.com> * Update .github/PULL_REQUEST_TEMPLATE/new_feature.md Co-authored-by: David Leal <halfpacho@gmail.com> * Added a way for peek bot to comment error * Update CONTRIBUTING.md Co-authored-by: Clemens Bastian <8781699+amacado@users.noreply.github.com> * Update .github/scripts/get_release_message.py Co-authored-by: Malte Jürgens <maltejur@web.de> * Update .github/scripts/get_release_message.py Co-authored-by: Malte Jürgens <maltejur@web.de> * Update .github/PULL_REQUEST_TEMPLATE/new_feature.md Co-authored-by: David Leal <halfpacho@gmail.com> * Clean up and updated CONTRIBUTING * Updated CONTRIBUTING * Add set up steps for release message workflow * Refactored peek workflow * Added requests library * Reformat devicon object error messages Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: Clemens Bastian <8781699+amacado@users.noreply.github.com> Co-authored-by: Malte Jürgens <maltejur@web.de>
This commit is contained in:
37
.github/drafts/check_devicon_object.py
vendored
37
.github/drafts/check_devicon_object.py
vendored
@@ -1,37 +0,0 @@
|
||||
from typing import List
|
||||
|
||||
# abandoned since it's not too hard to check devicon objects using our eyes
|
||||
# however, still keep in case we need it in the future
|
||||
|
||||
def check_devicon_objects(icons: List[dict]):
|
||||
"""
|
||||
Check that the devicon objects added is up to standard.
|
||||
"""
|
||||
err_msgs = []
|
||||
for icon in icons:
|
||||
if type(icon["name"]) != str:
|
||||
err_msgs.append("'name' must be a string, not: " + str(icon["name"]))
|
||||
|
||||
try:
|
||||
for tag in icon["tags"]:
|
||||
if type(tag) != str:
|
||||
raise TypeError()
|
||||
except TypeError:
|
||||
err_msgs.append("'tags' must be an array of strings, not: " + str(icon["tags"]))
|
||||
break
|
||||
|
||||
|
||||
if type(icon["versions"]["svg"]) != list or len(icon["versions"]["svg"]) == 0:
|
||||
err_msgs.append("Icon name must be a string")
|
||||
|
||||
if type(icon["versions"]["font"]) != list or len(icon["versions"]["svg"]) == 0:
|
||||
err_msgs.append("Icon name must be a string")
|
||||
|
||||
if type(icon["color"]) != str or "#" not in icon["color"]:
|
||||
err_msgs.append("'color' must be a string in the format '#abcdef'")
|
||||
|
||||
if type(icon["aliases"]) != list:
|
||||
err_msgs.append("'aliases' must be an array of dicts")
|
||||
|
||||
if len(err_msgs) > 0:
|
||||
raise Exception("Error found in devicon.json: \n" + "\n".join(err_msgs))
|
Reference in New Issue
Block a user