Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the svg checker so it doesn't post confirmation messages and updated CONTRIBUTING.md #542

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
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
33 changes: 19 additions & 14 deletions .github/workflows/post_check_svgs_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ jobs:
with:
path: ./svg_err_messages/svg_err_messages.txt

- name: Comment on the PR about the result - Success
uses: jungwinter/comment@v1 # let us comment on a specific PR
if: success() && steps.err_message_reader.outputs.content == '1'
env:
MESSAGE: |
Hi!
I'm Devicons' SVG-Checker Bot and everything looks great. Good job!
# - name: Comment on the PR about the result - Success
# uses: jungwinter/comment@v1 # let us comment on a specific PR
# if: success() && steps.err_message_reader.outputs.content == '1'
# env:
# MESSAGE: |
# Hi!
# I'm Devicons' SVG-Checker Bot and everything looks great. Good job!

Have a nice day,
SVG-Checker Bot :grin:
with:
type: create
issue_number: ${{ steps.pr_num_reader.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ env.MESSAGE }}
# Have a nice day,
# SVG-Checker Bot :grin:
# with:
# type: create
# issue_number: ${{ steps.pr_num_reader.outputs.content }}
# token: ${{ secrets.GITHUB_TOKEN }}
# body: ${{ env.MESSAGE }}

- name: Comment on the PR about the result - SVG Error
uses: jungwinter/comment@v1 # let us comment on a specific PR
Expand Down Expand Up @@ -79,6 +79,11 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}

# if we posted error messages before, we fail this entire workflow
- name: Fail workflow is there is an error.
uses: cutenode/[email protected]
if: success() && (steps.err_message_reader.outputs.content != '0' && steps.err_message_reader.outputs.content != '1')

- name: Comment on the PR about the result - Failure
uses: jungwinter/comment@v1 # let us comment on a specific PR
if: failure()
Expand Down
21 changes: 14 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ First of all, thanks for taking the time to contribute! This project can only gr
<h2 id="terms">Terms</h2>
<p>Here are some terms that we will use in this repo: </p>
<ol>
<li>"Icon" refers to the set of svgs/icons of a technology/tool. Ex: We might refer to the React svgs and React icons as the React Icon</li>
<li>"SVG/<code>.svg</code>" refers to the <code>svg</code> versions of the Icons.</li>
<li>"icons" (lowercase) refers to the font icon versions of the Icons.</li>
<li>"Technology" is used to describe a software, libraries, tool, etc...</li>
<li>"Icon" refers to the svgs and icons version of a technology as a whole.</i>
<li>"SVG/<code>svg</code>" refers to the <code>svg</code> versions of the Icons.</li>
<li>"icon" (lowercase) refers specficially to the font icon versions of the Icons.</li>
</ol>

<hr>
<h2 id="overview">Overview on Submitting Icons</h2>
<p>Here is an overview of what you have to do to submit your icons to the repo.</p>
<p>Here is what you have to do to submit your icons to the repo.</p>
<ol>
<li>Create the svgs for each <a href="#versionNaming"> svg versions </a> that you have</li>
<li>Put the svgs of each Icon into its own folders in <code>/icons</code> </li>
Expand All @@ -44,6 +45,13 @@ First of all, thanks for taking the time to contribute! This project can only gr

<hr>
<h2 id='versionNaming'>Versions and Naming Conventions</h2>
<p>For the technology name, make the file and folder name lowercase and concatenate them. For example:</p>
<ul>
<li>AngularJS becomes <code>angularjs</code> or just <code>angular</code></li>
<li>Amazon Web Services becomes <code>amazonwebservices</code></li>
<li>Microsoft SQL Server becomes <code>microsoftsqlserver</code></li>
</ul>

<p>Each icon/svg can come in different versions. So far, we have:</p>
<ul>
<li><b>original</b>: the original logo. Can contain multiple colors. <a href="https://github.com/devicons/devicon/blob/master/icons/amazonwebservices/amazonwebservices-original.svg"> Example </a> </li>
Expand All @@ -66,7 +74,6 @@ First of all, thanks for taking the time to contribute! This project can only gr
</li>
<li>
Some icons are really simple (ex. Apple), so the original version can be used as the plain version and as the icon font. In this case, you'll only need to make one of the version (either "original" or "plain"). You can then add an alias in the <code>devicon.json</code> so they can be found with either the "original" or "plain" naming convention. Note: this only applies to font icon versions only, not the SVG versions.

</li>
</ul>

Expand All @@ -75,15 +82,15 @@ First of all, thanks for taking the time to contribute! This project can only gr
<p>Before you submit your logos/svgs, please ensure that they meet the following standard:</p>
<ul>
<li>The background must be transparent.</li>
<li>The svg name follows this convention: <code>(Icon name)-(original|plain|line)(-wordmark?).</code></li>
<li>The svg name follows this convention: <code>(Technology name)-(original|plain|line)(-wordmark?).</code></li>
<li>The <b>plain</b> and <b>line</b> versions (with or without wordmark) need to stay as simple as possible. They must have only one color and the paths are united. We will strip the color when turning it into icons so they can have any color.
</li>
<li>Optimize/compress your SVGs. You can use a service like <a href="https://compressor.io/">compressor</a> or <a href="https://petercollingridge.appspot.com/svg-editor">SVG Editor</a>.</li>
<li>The icon's strokes and texts must be fills. This is to satisfy our conversion website's <a href="https://icomoon.io/#docs/stroke-to-fill">requirements.</a></li>
<li>Each <code>.svg</code> file contains one version of an icon in a <code>0 0 128 128</code> viewbox. You can use a service like <a href="https://www.iloveimg.com/resize-image/resize-svg">resize-image</a> for scaling the svg.</li>
<li>The <code>svg</code> element does not need the <code>height</code> and <code>width</code> attributes. However, if you do use it, ensure their values are either <code>"128"</code> or <code>"128px"</code>. Ex: <code>height="128"</code></li>
<li>Each <code>.svg</code> must use the <code>fill</code> attribute instead of using <code>classes</code> for colors. See <a href="https://github.com/devicons/devicon/issues/407">here</a> for more details.</li>
<li>The naming convention for the svg file is the following: <code>(Icon name)-(original|plain|line)(-wordmark?).</code></li>
<li>The naming convention for the svg file is the following: <code>(Technology name)-(original|plain|line)(-wordmark?).</code></li>
</ul>

<hr>
Expand Down