Skip to content

Commit b890d9c

Browse files
authored
Merge pull request #61 from Snailedlt/feature/only_check_for_stroke_attr_if_used_by_icomoon
Feature/only check for stroke attr if used by icomoon
2 parents 1119b9f + 149652d commit b890d9c

File tree

413 files changed

+8398
-948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+8398
-948
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
8+
[**.json]
9+
indent_style = space
10+
indent_size = 4
11+
trim_trailing_whitespace = true
12+
13+
[**.svg]
14+
trim_trailing_whitespace = false

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
2-
description: Report a bug/issue that you found in the SVGs, CSS files, etc.
3-
title: '[BUG] <bug name>'
2+
description: Report a bug/issue that you found in the SVGs, CSS files, or any other bug you encounter.
3+
title: '[BUG]: <bug name>'
44
labels: [bug]
55
body:
66
- type: markdown
@@ -18,7 +18,7 @@ body:
1818
id: description
1919
attributes:
2020
label: Bug description
21-
description: Short description of the bug that you found. Provide images/code if applicable.
21+
description: Short description of the bug. Provide images/code if applicable.
2222
validations:
2323
required: true
2424

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature Request
22
description: Requesting a new feature or changes to an existing feature
3-
title: '[FEATURE REQUEST] <feature name>'
3+
title: '[FEATURE REQUEST]: <feature name>'
44
labels: [enhancement]
55
body:
66
- type: markdown
@@ -15,13 +15,21 @@ body:
1515
required: true
1616

1717
- type: textarea
18-
id: currentproblem
18+
id: description
1919
attributes:
20-
label: Problem
21-
description: Tell us about the problem and its negative impacts.
20+
label: Description
21+
description: Write down a detailed description of the feature.
2222
validations:
2323
required: true
2424

25+
- type: textarea
26+
id: context
27+
attributes:
28+
label: Context
29+
description: Why is this change important to you? How would you use it? How can it benefit other users?
30+
validations:
31+
required: true
32+
2533
- type: textarea
2634
id: possiblesolution
2735
attributes:

.github/ISSUE_TEMPLATE/icon_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Icon Request
2-
description: Requesting a new icon or changes to an existing icon
2+
description: Request a new icon, or changes to an existing icon
33
title: '[ICON REQUEST]: <icon name>'
44
labels: ["request:icon"]
55
body:

.github/ISSUE_TEMPLATE/other.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Other
2-
description: Use this for any other issues. Do not create blank issues
3-
title: "[OTHER] <description>"
2+
description: Use this for any other issues. Please do NOT create blank issues
3+
title: "[OTHER]: <description>"
44
labels: ["awaiting triage"]
55
body:
66
- type: markdown

.github/PULL_REQUEST_TEMPLATE/new_feature.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
- [ ] PR does not match another non-stale PR currently opened
55

66
## Features
7-
<!-- List your features here and the benefits they bring. Include images/codes as appropriate -->
7+
<!-- List your features here and the benefits they bring. Include images/codes if appropriate -->
88

99
**This PR closes NONE**
1010
<!-- List issues that this PR would close above. Ex: This PR closes #1, #2, #3. -->
11+
<!-- If your pull request does not fix any issue, it's best to make an issue OR remove this section, depending on your changes. -->
1112

1213
## Notes
1314
<!-- List anything note-worthy here (potential issues, this needs to be merged to `master` before working, etc.). -->

.github/PULL_REQUEST_TEMPLATE/new_icon.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<!-- Tick the checkboxes to ensure you've done everything correctly -->
44
- [ ] PR does not match another non-stale PR currently opened
5-
- [ ] PR name matches the format *new icon: <i>Icon name</i> (<i>versions separated by comma</i>)*. More details [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#overview)
5+
- [ ] PR name matches the format *new icon: <i>Icon name</i> (<i>versions separated by comma</i>)*. More details [here](https://github.com/devicons/devicon/wiki/Overview-on-Submitting-Icons)
66
- [ ] PR's base is the `develop` branch.
7-
- [ ] Your icons are inside a folder as seen [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#organizational-guidelines)
8-
- [ ] SVG matches the standards laid out [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#svgStandards)
9-
- [ ] A new object is added in the `devicon.json` file as seen [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#-updating-the-deviconjson-)
7+
- [ ] Your icons are inside a folder as seen [here](https://github.com/devicons/devicon/wiki/Organizing-SVGs)
8+
- [ ] SVG matches the standards laid out [here](https://github.com/devicons/devicon/wiki/SVG-Standards)
9+
- [ ] A new object is added in the `devicon.json` file as seen [here](https://github.com/devicons/devicon/wiki/Updating-the-%60devicon.json%60)
1010

1111
<!-- Refer to the [contributing](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#contributing-to-devicon) guidelines for more details. -->
1212

.github/drafts/stale.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ jobs:
1010
- uses: actions/stale@main
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
13-
stale-pr-message: 'Hello there,
14-
we noticed that this PR has been inactive for a while now. If there are any changes which are suitable for our repository,
15-
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.
13+
stale-pr-message: "Hello there,
14+
we have noticed that this PR has been inactive for a while now. If there are any changes which are suitable for our repository,
15+
we would love to have it. It would be great if you can continue with this PR, but if you can't, we might fork your changes and merge them ourselves.
1616
17-
Since GitHub tracks contributions by commits, you will still be credited.
17+
Since GitHub tracks contributions by commits, you'll still be credited.
18+
Let us know what you think about this. :slight_smile:
1819
19-
Let us know what you think 😃'
20+
21+
Feel free to [join our Discord server](https://discord.gg/hScy8KWACQ) for support, hangouts, and more
22+
Thank you and have a nice day!"
2023
stale-pr-label: 'stale'
2124
days-before-pr-stale: 30
2225
days-before-pr-close: -1

.github/pull_request_template.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
### Adding a New Icon?
2-
- Add `?quick_pull=1&template=new_icon.md` to the end of your current URL and press `Enter`
1+
<!--
32
4-
### Adding a New Feature or fixing a bug?
5-
- Add `?quick_pull=1&template=new_feature.md` to the end of your current URL and press `Enter`.
3+
Adding a New Icon?
4+
5+
- Add `?quick_pull=1&template=new_icon.md` to the end of your current URL and press `Enter`.
6+
7+
Adding a New Feature or fixing a bug?
8+
9+
- Add `?quick_pull=1&template=new_feature.md` to the end of your current URL and press `Enter`.
10+
11+
-->

.github/scripts/build_assets/util.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from pathlib import Path
23
import re
34
from typing import List
45
import platform
@@ -71,7 +72,23 @@ def find_object_added_in_pr(icons: List[dict], pr_title: str):
7172
raise Exception(message)
7273

7374

75+
def is_svg_in_font_attribute(svg_file_path: Path, devicon_object: dict):
76+
"""
77+
Check if svg is in devicon.json's font attribute.
78+
:param svg_file_path, the path to a single svg icon
79+
:devicon_object, an object for a single icon inside devicon.json
80+
:return true if the svg exists in the devicon_object's font attribute, false if it doesn't
81+
"""
82+
icon_version = svg_file_path.name.split('-', 1)[1]
83+
font_object = devicon_object["versions"]["font"]
84+
return icon_version in font_object
85+
86+
7487
valid_svg_filename_pattern = re.compile(r"-(original|plain|line)(-wordmark)?\.svg$")
7588
def is_svg_name_valid(filename: str):
7689
return valid_svg_filename_pattern.search(filename) is not None
7790

91+
92+
valid_svg_version_pattern = re.compile(r"^(original|plain|line)(-wordmark)?$")
93+
def is_svg_version_valid(version):
94+
return valid_svg_version_pattern.search(version) is not None

0 commit comments

Comments
 (0)