mirror of
https://github.com/konpa/devicon.git
synced 2025-08-13 18:14:21 +02:00
Fixed error with logging
This commit is contained in:
18
.github/scripts/icomoon_peek.py
vendored
18
.github/scripts/icomoon_peek.py
vendored
@@ -16,19 +16,19 @@ def main():
|
|||||||
# get only the icon object that has the name matching the pr title
|
# get only the icon object that has the name matching the pr title
|
||||||
filtered_icons = find_object_added_in_this_pr(new_icons, args.pr_title)
|
filtered_icons = find_object_added_in_this_pr(new_icons, args.pr_title)
|
||||||
|
|
||||||
# print list of new icons
|
|
||||||
print("List of new icons:", *new_icons, sep = "\n")
|
|
||||||
print("Icons being uploaded:", *filtered_icons, sep = "\n")
|
|
||||||
|
|
||||||
if len(new_icons) == 0:
|
if len(new_icons) == 0:
|
||||||
sys.exit("No files need to be uploaded. Ending script...")
|
sys.exit("No files need to be uploaded. Ending script...")
|
||||||
|
|
||||||
if len(filtered_icons) == 0:
|
if len(filtered_icons) == 0:
|
||||||
sys.exit("No icons found matching the icon name in the PR's title.",
|
message = "No icons found matching the icon name in the PR's title.\n" \
|
||||||
"Ensure that the PR title matches the convention here: ",
|
"Ensure that the PR title matches the convention here: \n" \
|
||||||
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview.",
|
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview.\n" \
|
||||||
"Ending script...",
|
"Ending script...\n"
|
||||||
sep='\n')
|
sys.exit(message)
|
||||||
|
|
||||||
|
# print list of new icons
|
||||||
|
print("List of new icons:", *new_icons, sep = "\n")
|
||||||
|
print("Icons being uploaded:", *filtered_icons, sep = "\n", end='\n\n')
|
||||||
|
|
||||||
runner = None
|
runner = None
|
||||||
try:
|
try:
|
||||||
|
6
.github/workflows/peek_icons.yml
vendored
6
.github/workflows/peek_icons.yml
vendored
@@ -89,7 +89,6 @@ jobs:
|
|||||||
if: failure()
|
if: failure()
|
||||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||||
env:
|
env:
|
||||||
OVERVIEW_IMG_URL: ${{ fromJSON(steps.icons_overview_img_step.outputs.imgur_urls)[0] }}
|
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
Hi!
|
Hi!
|
||||||
|
|
||||||
@@ -103,12 +102,11 @@ jobs:
|
|||||||
|
|
||||||
Once everything is fixed, the maintainers will try again. If I still fail, the maintainers will investigate what cause this problem.
|
Once everything is fixed, the maintainers will try again. If I still fail, the maintainers will investigate what cause this problem.
|
||||||
|
|
||||||
Thank you for your help :smile
|
Thank you for your help :smile:
|
||||||
|
|
||||||
Cheers :),
|
Cheers :),
|
||||||
|
|
||||||
Peek Bot
|
Peek Bot
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
message: ${{format(env.MESSAGE, env.OVERVIEW_IMG_URL, env.DETAILED_IMGS_MARKDOWN)}}
|
message: ${{env.MESSAGE}}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user