Skip to content

Commit f51bda7

Browse files
committed
Added pr comment action
1 parent ab0cba5 commit f51bda7

1 file changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/peek_icons.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: 3.8
19-
- name: Install dependencies (python, pip)
19+
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
2222
pip install -r ./.github/scripts/requirements.txt
@@ -29,22 +29,35 @@ jobs:
2929
name: geckodriver-log
3030
path: ./geckodriver.log
3131
- name: Upload screenshot of the newly made icons
32+
id: imgur_step
3233
uses: Thomas-Boi/public-upload-to-imgur@v1
3334
if: ${{success()}}
3435
with:
3536
img_path: ./new_icons.png
3637
client_id: ${{secrets.IMGUR_CLIENT_ID}}
37-
# - name: Comment on the PR about the result
38-
# uses: github-actions-up-and-running/pr-comment@v1.0.1
39-
# with:
40-
# repo-token: ${{ secrets.GITHUB_TOKEN }}
41-
# message: >
42-
# Hi! I'm Devicons' GitHub Actions Bot!
38+
- name: Comment on the PR about the result
39+
uses: github-actions-up-and-running/pr-comment@v1.0.1
40+
env:
41+
IMG_URL: ${{ steps.imgur_step.outputs.imgur_url }}
42+
MESSAGE: >
43+
Hi! I'm Devicons' Peek Bot!
4344
44-
# I just peeked at the icons that you wanted to add and upload them to the
45-
# [Actions page](https://github.com/devicons/devicon/actions). The maintainers
46-
# will now take a look at it and decide whether to merge your PR.
45+
I just peeked at the icons that you wanted to add using [icomoon.io](https://icomoon.io/app/#/select).
4746
48-
# Cheers :),
47+
Here is the result below:
48+
49+
![Peeked Icons (top left)]({0})
50+
51+
Note: If the image doesn't show up, it's probably because it has been autodeleted by Imgur after 6 months due to our API choice.
52+
53+
Here is [the url]({1}).
54+
55+
56+
The maintainers will now take a look at it and decide whether to merge your PR.
57+
58+
Cheers :),
4959
50-
# Bot
60+
Peek Bot
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
63+
message: ${{format(env.MESSAGE, env.IMG_URL, env.IMG_URL)}}

0 commit comments

Comments
 (0)