Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into amacado/feature/re…
Browse files Browse the repository at this point in the history
…adme-release-strategy

# Conflicts:
#	CONTRIBUTING.md
  • Loading branch information
amacado committed Apr 9, 2021
2 parents 573a8af + 2062431 commit b7ce626
Show file tree
Hide file tree
Showing 48 changed files with 896 additions and 66 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/peek_icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ on:
pull_request:
types: [labeled]
jobs:
build:
peek:
# four outcomes: successful check and upload,
# unsuccessful check (fail due to user),
# fail due to system, skipped
name: Peek Icons
if: github.event.label.name == 'bot:peek'
runs-on: windows-2019
Expand All @@ -20,6 +23,18 @@ jobs:
python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt
- name: Save the PR number in an artifact
shell: bash
env:
PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt

- name: Upload the PR number
uses: actions/upload-artifact@v2
with:
name: pr_num
path: ./pr_num.txt

- name: Run icomoon_peek.py
env:
PR_TITLE: ${{ github.event.pull_request.title }}
Expand All @@ -36,21 +51,9 @@ jobs:
name: screenshots
path: ./screenshots/*.png

- name: Save the pr num in an artifact
shell: bash
env:
PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt

- name: Upload the pr num
uses: actions/upload-artifact@v2
with:
name: pr_num
path: ./pr_num.txt

- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
if: failure()
with:
name: geckodriver-log
path: ./geckodriver.log
path: ./geckodriver.log
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/action-always-fail@v1.0.1
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
29 changes: 18 additions & 11 deletions .github/workflows/post_peek_screenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ jobs:
post_screenshots_in_comment:
name: Post the screenshot
runs-on: ubuntu-18.04
if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'skipped'
env:
# three possible values: 'skipped', 'success', 'failure'
# have to print github.event to console to see these values
# note: can't use this env variable up in the if statement above for some reason.
# I don't think it's an ordering issue cause it seems 'if' is auto evaluate first
PEEK_STATUS: ${{ github.event.workflow_run.conclusion }}
steps:
- name: Check if the trigger run worked. If not, fail the current run.
if: github.event.workflow_run.conclusion != 'success'
uses: cutenode/action-always-fail@v1.0.1
- name: Check state of last run
run: echo $PEEK_STATUS

- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.11.0
Expand All @@ -21,14 +27,14 @@ jobs:
run_id: ${{ github.event.workflow_run.id }}

- name: Read the pr_num file
if: success()
id: pr_num_reader
uses: juliangruber/read-file-action@v1.0.0
with:
path: ./pr_num/pr_num.txt

- name: Upload screenshot of the newly made icons gotten from the artifacts
id: icons_overview_img_step
if: env.PEEK_STATUS == 'success' && success()
uses: devicons/public-upload-to-imgur@v2.2.1
with:
path: ./screenshots/new_icons.png
Expand All @@ -37,17 +43,15 @@ jobs:
- name: Upload zoomed in screenshot of the newly made icons gotten from the artifacts
id: icons_detailed_img_step
uses: devicons/public-upload-to-imgur@v2.2.1
if: success()
if: env.PEEK_STATUS == 'success' && success()
with:
path: ./screenshots/screenshot_*.png
client_id: ${{secrets.IMGUR_CLIENT_ID}}

- name: Comment on the PR about the result - Success
uses: jungwinter/comment@v1 # let us comment on a specific PR
if: success()
if: env.PEEK_STATUS == 'success' && success()
env:
OVERVIEW_IMG_MARKDOWN: ${{ fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0] }}
DETAILED_IMGS_MARKDOWN: ${{ join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), '') }}
MESSAGE: |
Hi there,
Expand All @@ -71,10 +75,13 @@ jobs:
type: create
issue_number: ${{ steps.pr_num_reader.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{format(env.MESSAGE, env.OVERVIEW_IMG_MARKDOWN, env.DETAILED_IMGS_MARKDOWN)}}
body: >
${{ format(env.MESSAGE,
fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0],
join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), '')) }}
- name: Comment on the PR about the result - Failure
if: failure() || cancelled()
if: failure() || env.PEEK_STATUS == 'failure'
uses: jungwinter/comment@v1 # let us comment on a specific PR
env:
MESSAGE: |
Expand All @@ -88,7 +95,7 @@ jobs:
- 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, I will try. If I still fail (sorry!), the maintainers will investigate further.
I will retry once everything is fixed. If I still fail (sorry!) or there are other erros, the maintainers will investigate.
Best of luck,
Peek Bot :relaxed:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Stale'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'Hello there,
we noticed that this PR has been inactive for a while now. If there are any changes which are suitable for our repository,
we would love to have it. It would be great if you can continue with this PR, but if you cannot, we might fork your changes and merge the changes ourselves.
Since GitHub tracks contributions by commits, you will still be credited.
Let us know what you think 😃'
stale-pr-label: 'stale'
days-before-pr-stale: 30
days-before-pr-close: -1
31 changes: 23 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Contributing to Devicon</h1>
<p>
First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintable we developed some guidelines for contributions.
First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintainable, we have developed some guidelines for our contributors.
</p>

<h2>Table of Content</h2>
Expand All @@ -15,21 +15,23 @@ First of all, thanks for taking the time to contribute! This project can only gr
<li><a href="#requestingIcon">Requesting An Icon</a></li>
<li><a href="#teams">Maintainer/Reviewer/Teams</a></li>
<li><a href="#buildScript">Regarding the Build Script</a></li>
<li><a href="#discordServer">Discord server</a></li>
<li><a href="#release">Release strategy, conventions, preparation and execution</a></li>
</ul>

<hr>
<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 +46,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 +75,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 +83,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 Expand Up @@ -301,6 +309,12 @@ As an example, let's assume you have created the svgs for Redhat and Amazon Web
<li>Publishing a new release to <a href="https://www.npmjs.com/package/devicon">npm</a>; See <a href="https://github.com/devicons/devicon/issues/288">#288</a></li>
</ul>

<h2 id="discordServer">Discord server</h2>
<p>
We are running a Discord server. You can go here to talk, discuss, and more with the maintainers and other people, too. Here's the invitation: https://discord.gg/hScy8KWACQ. If you don't have a GitHub account but want to suggest ideas or new icons, you can do that here in our Discord channel.
<b>Note that the Discord server is unofficial, and Devicons is still being maintained via GitHub.<b>
</p>

<h2 id='release'>Release strategy, conventions, preparation and execution</h2>
<h5>Release strategy</h5>
<p>Devicon does not follow a strict release plan. A new release is depended on current amount of contributions, required bugfixes/patches and will be discussed by the team of maintainers.</p>
Expand All @@ -312,6 +326,7 @@ As an example, let's assume you have created the svgs for Redhat and Amazon Web
<li>MINOR version when you add functionality <b>(like a new icon)</b> in a backwards compatible manner, and</li>
<li>PATCH version when you make backwards compatible bug fixes.</li>
</ul>

<h5>Release preparation and execution</h5>
<ol>
<li>Define the next release version number based on the conventions</li>
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<li><a href="#getting-started">Getting started</a></li>
<li><a href="#request-icon">Requesting icon</a></li>
<li><a href="#contribute">Contributing</a></li>
<li><a href="#stale-prs">Stale pull requests</a></li>
<li><a href="#build-yourself">Go build yourself</a></li>
</ol>

Expand Down Expand Up @@ -155,6 +156,17 @@ Add css rules in your stylesheet
to see how you can contribute to this project.
</p>

<h2 id="stale-prs">Stale pull requests</h2>
<p>
After a pull request has been open for over 30 days with no activity or response from the author, it'll be automatically marked as stale. We might fork your changes and merge the changes ourselves. Since GitHub tracks contributions by commits, you will be credited.
</p>

<h2 id="discord-server">Discord server</h2>
<p>
We are running a Discord server. You can go here to talk, discuss, and more with the maintainers and other people, too. Here's the invitation: https://discord.gg/hScy8KWACQ.
<b>Note that the Discord server is unofficial, and Devicons is still being maintained via GitHub.<b>
</p>

<h2 id="build-yourself">Go build yourself</h2>
<p>
Feel free to follow those steps when you want to build the font
Expand Down
Loading

0 comments on commit b7ce626

Please sign in to comment.