Skip to content

Commit e51fb1c

Browse files
committed
Fixed error with logging
1 parent a84cd46 commit e51fb1c

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

.github/scripts/icomoon_peek.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ def main():
1616
# get only the icon object that has the name matching the pr title
1717
filtered_icons = find_object_added_in_this_pr(new_icons, args.pr_title)
1818

19-
# print list of new icons
20-
print("List of new icons:", *new_icons, sep = "\n")
21-
print("Icons being uploaded:", *filtered_icons, sep = "\n")
22-
2319
if len(new_icons) == 0:
2420
sys.exit("No files need to be uploaded. Ending script...")
2521

2622
if len(filtered_icons) == 0:
27-
sys.exit("No icons found matching the icon name in the PR's title.",
28-
"Ensure that the PR title matches the convention here: ",
29-
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview.",
30-
"Ending script...",
31-
sep='\n')
23+
message = "No icons found matching the icon name in the PR's title.\n" \
24+
"Ensure that the PR title matches the convention here: \n" \
25+
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview.\n" \
26+
"Ending script...\n"
27+
sys.exit(message)
28+
29+
# print list of new icons
30+
print("List of new icons:", *new_icons, sep = "\n")
31+
print("Icons being uploaded:", *filtered_icons, sep = "\n", end='\n\n')
3232

3333
runner = None
3434
try:

.github/workflows/peek_icons.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ jobs:
8989
if: failure()
9090
uses: github-actions-up-and-running/pr-comment@v1.0.1
9191
env:
92-
OVERVIEW_IMG_URL: ${{ fromJSON(steps.icons_overview_img_step.outputs.imgur_urls)[0] }}
9392
MESSAGE: |
9493
Hi!
9594
@@ -103,12 +102,11 @@ jobs:
103102
104103
Once everything is fixed, the maintainers will try again. If I still fail, the maintainers will investigate what cause this problem.
105104
106-
Thank you for your help :smile
105+
Thank you for your help :smile:
107106
108107
Cheers :),
109108
110109
Peek Bot
111110
with:
112111
repo-token: ${{ secrets.GITHUB_TOKEN }}
113-
message: ${{format(env.MESSAGE, env.OVERVIEW_IMG_URL, env.DETAILED_IMGS_MARKDOWN)}}
114-
112+
message: ${{env.MESSAGE}}

0 commit comments

Comments
 (0)