Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/scripts/build_assets/filehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,20 @@ def get_added_modified_svgs(files_added_json_path: str,
Get the svgs added and modified from the files_changed_json_path.
:param: files_added_json_path, the path to the files_added.json created by the gh-action-get-changed-files@2.1.4
:param: files_modified_json_path, the path to the files_modified.json created by the gh-action-get-changed-files@2.1.4
:return: a list of the svg file paths that were added/modified in this pr as Path.
:return: a list of the svg file paths that were added/modified in this pr as Path. It will only return icons in /icons path (see https://github.com/devicons/devicon/issues/505)
"""
files_added = get_json_file_content(files_added_json_path)
files_modified = get_json_file_content(files_modified_json_path)

svgs = []
for file in files_added:
path = Path(file)
if path.suffix.lower() == ".svg":
if path.suffix.lower() == ".svg" and path.as_posix().lower().startswith('icons/'):
svgs.append(path)

for file in files_modified:
path = Path(file)
if path.suffix.lower() == ".svg":
if path.suffix.lower() == ".svg" and path.as_posix().lower().startswith('icons/'):
svgs.append(path)

return svgs
Expand Down