mirror of
https://github.com/konpa/devicon.git
synced 2025-09-02 02:42:48 +02:00
Added check script for the icons and fix icons with fill or viewBox issues (#460)
* Added script to check svg fill and viewBox * Fix cucumber-plain-wordmark * Fix various fill and viewBox issues in svgs * Added check for height and width attr * Added check_svgs workflow * Fix an issue where the error is not log properly * Added on push for testing * Updated trigger so it now runs whenever PR is update * Added sleep to script to make logs nicer * Added script that create env var * Updated the github_env to accomodate ubuntu * Change format of log and allow filehandler to return Path * Updated logging messages * Updated refs for the checkout action * Make logging nicer * Updated fix messaging so it's more clear * fix icons: icons/cucumber/cucumber-plain-wordmark.svg, icons/intellij/intellij-plain-wordmark.svg, icons/jenkins/jenkins-plain.svg, icons/twitter/twitter-original.svg, icons/yunohost/yunohost-plain.svg
This commit is contained in:
16
.github/workflows/build_icons.yml
vendored
16
.github/workflows/build_icons.yml
vendored
@@ -8,7 +8,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name}}
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
@@ -44,13 +43,24 @@ jobs:
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
env:
|
||||
MESSAGE: |
|
||||
Automated font-building task ran by GitHub Actions bot. This PR built new font files and devicon.css file.
|
||||
What's up!
|
||||
|
||||
Here are all the files that were built:
|
||||
I'm Devicon's Build Bot and I just built some new font files and devicon.min.css file.
|
||||
|
||||
Here are all the files that were built into icons:
|
||||
|
||||

|
||||
|
||||
The devicon.min.css file contains:
|
||||
-The icon content
|
||||
-The aliases
|
||||
-The colored classes
|
||||
-The default fallback font
|
||||
|
||||
More information can be found in the GitHub Action logs for this workflow.
|
||||
|
||||
Adios,
|
||||
Build Bot :sunglasses:
|
||||
with:
|
||||
branch: 'master-build-result'
|
||||
base: 'master'
|
||||
|
60
.github/workflows/check_svgs.yml
vendored
Normal file
60
.github/workflows/check_svgs.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Check SVGs
|
||||
on: pull_request
|
||||
jobs:
|
||||
check:
|
||||
name: Check the SVGs' quality
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: python -m pip install --upgrade pip
|
||||
- name: Run the check_svg script
|
||||
run: >
|
||||
python ./.github/scripts/check_svgs.py ./icomoon.json ./devicon.json ./icons
|
||||
- name: Comment on the PR about the result - Success
|
||||
if: success()
|
||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||
env:
|
||||
MESSAGE: |
|
||||
Hi!
|
||||
I'm Devicons' SVG-Checker Bot and I just checked all the SVGs in this branch.
|
||||
|
||||
Everything looks great. Good job!
|
||||
|
||||
Have a nice day,
|
||||
SVG-Checker Bot :grin:
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: ${{ env.MESSAGE }}
|
||||
|
||||
- name: Comment on the PR about the result - Failed
|
||||
if: failure()
|
||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||
env:
|
||||
MESSAGE: |
|
||||
Hi!
|
||||
|
||||
I'm Devicons' SVG-Checker Bot and it seems we've ran into a problem. I'm supposed to check your svgs but I couldn't do my task due to an issue.
|
||||
|
||||
Here is what went wrong:
|
||||
```
|
||||
{0}
|
||||
```
|
||||
|
||||
For more reference, check out our [CONTRIBUTING guide](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#svgStandards)
|
||||
|
||||
Please address these issues. When you update this PR, I will check your SVGs again.
|
||||
|
||||
Thanks for your help,
|
||||
SVG-Checker Bot :smile:
|
||||
|
||||
PS. One day, I will be smart enough to fix these errors for you :persevere:. Until then, I can only point them out.
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: ${{ format(env.MESSAGE, env.ERR_MSGS)}}
|
19
.github/workflows/peek_icons.yml
vendored
19
.github/workflows/peek_icons.yml
vendored
@@ -4,11 +4,13 @@ on:
|
||||
types: [labeled]
|
||||
jobs:
|
||||
build:
|
||||
name: Get Fonts From Icomoon
|
||||
name: Peek Icons
|
||||
if: contains(github.event.pull_request.labels.*.name, 'bot:peek')
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
@@ -42,23 +44,20 @@ jobs:
|
||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||
env:
|
||||
MESSAGE: |
|
||||
Hi!
|
||||
~Hi
|
||||
|
||||
I'm Devicons' Peek Bot and it seems we've ran into a problem. I'm supposed to check your svgs but I couldn't do my task due to an issue.
|
||||
I'm Devicons' Peek Bot and it seems we've ran into a problem (sorry!).
|
||||
|
||||
Can you please double check and fix the possible issues below:
|
||||
Please double check and fix the possible issues below:
|
||||
|
||||
- Your svgs are named and added correctly to the /icons folder as seen [here](https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#orgGuidelines).
|
||||
- Your icon information has been added to the `devicon.json` as seen [here](https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#updateDevicon)
|
||||
- Your PR title follows the format seen [here](https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview)
|
||||
|
||||
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, I will try. If I still fail (sorry!), the maintainers will investigate further.
|
||||
|
||||
Thank you for your help :smile:
|
||||
|
||||
Cheers :),
|
||||
|
||||
Peek Bot
|
||||
Best of luck,
|
||||
Peek Bot :relaxed:
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: ${{env.MESSAGE}}
|
||||
|
Reference in New Issue
Block a user