1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-22 22:24:43 +02:00

Update the check-bot (#970)

* Add check for strokes in check-bot

* Add check for svg file name

* Update gulpfile to remove x and y of svg elem

* Revert name changes to err file

* check-bot now check devicon object as well

* Fixed minor bugs

* Improve logging in check_icon

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Thomas Bui
2022-03-13 15:02:41 -07:00
committed by GitHub
parent 5153e0f0da
commit bb589370da
9 changed files with 221 additions and 194 deletions

View File

@@ -5,7 +5,6 @@ import platform
import sys
import traceback
def exit_with_err(err: Exception):
"""
Exit the current step and display the err.
@@ -66,3 +65,9 @@ def find_object_added_in_pr(icons: List[dict], pr_title: str):
message = "util.find_object_added_in_pr: Couldn't find an icon matching the name in the PR title.\n" \
f"PR title is: '{pr_title}'"
raise Exception(message)
valid_svg_filename_pattern = re.compile(r"-(original|plain|line)(-wordmark)?\.svg$")
def is_svg_name_valid(filename: str):
return valid_svg_filename_pattern.search(filename) is not None