-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into icons/tensorflow
- Loading branch information
Showing
28 changed files
with
401 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## This PR adds... | ||
|
||
*List your features here and their reasons for creation.* | ||
|
||
## Notes | ||
|
||
*List anything note-worthy here (potential issues, this needs merge to `master` before working, etc....).* | ||
|
||
*Don't forget to link any issues that this PR will solved.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**Double check these details before you open a PR** | ||
|
||
- [] PR does not match another non-stale PR currently opened | ||
- [] PR name matches the format *new icon: <i>Icon name</i> (<i>versions separated by comma</i>)* as seen [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#overview) | ||
- [] Your icons are put in a folder as seen [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#organizational-guidelines) | ||
- [] SVG matches the standards laid out [here](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#svgStandards) | ||
- [] 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-) | ||
|
||
Refer to the [`CONTRIBUTING.md`](https://github.com/devicons/devicon/blob/develop/CONTRIBUTING.md#contributing-to-devicon) for more details. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import requests | ||
from build_assets import arg_getters | ||
import re | ||
|
||
def main(): | ||
print("Please wait a few seconds...") | ||
args = arg_getters.get_release_message_args() | ||
queryPath = "https://api.github.com/repos/devicons/devicon/pulls?accept=application/vnd.github.v3+json&state=closed&per_page=100" | ||
stopPattern = r"^(r|R)elease v" | ||
headers = { | ||
"Authorization": f"token {args.token}" | ||
} | ||
|
||
response = requests.get(queryPath, headers=headers) | ||
if not response: | ||
print(f"Can't query the GitHub API. Status code is {response.status_code}. Message is {response.text}") | ||
return | ||
|
||
data = response.json() | ||
newIcons = [] | ||
features = [] | ||
|
||
for pullData in data: | ||
if re.search(stopPattern, pullData["title"]): | ||
break | ||
|
||
authors = findAllAuthors(pullData, headers) | ||
markdown = f"- [{pullData['title']}]({pullData['html_url']}) by {authors}." | ||
|
||
if isFeatureIcon(pullData): | ||
newIcons.append(markdown) | ||
else: | ||
features.append(markdown) | ||
|
||
thankYou = "A huge thanks to all our maintainers and contributors for making this release possible!" | ||
iconTitle = "**{} New Icons**\n".format(len(newIcons)) | ||
featureTitle = "**{} New Features**\n".format(len(features)) | ||
finalString = "{0}\n\n {1}{2}\n\n {3}{4}".format(thankYou, | ||
iconTitle, "\n".join(newIcons), featureTitle, "\n".join(features)) | ||
|
||
print("--------------Here is the build message--------------\n", finalString) | ||
|
||
|
||
""" | ||
Check whether the pullData is a feature:icon PR. | ||
:param pullData | ||
:return true if the pullData has a label named "feature:icon" | ||
""" | ||
def isFeatureIcon(pullData): | ||
for label in pullData["labels"]: | ||
if label["name"] == "feature:icon": | ||
return True | ||
return False | ||
|
||
|
||
""" | ||
Find all the authors of a PR based on its commits. | ||
:param pullData - the data of a pull request. | ||
""" | ||
def findAllAuthors(pullData, authHeader): | ||
response = requests.get(pullData["commits_url"], headers=authHeader) | ||
if not response: | ||
print(f"Can't query the GitHub API. Status code is {response.status_code}") | ||
print("Response is: ", response.text) | ||
return | ||
|
||
commits = response.json() | ||
authors = set() # want unique authors only | ||
for commit in commits: | ||
authors.add("@" + commit["author"]["login"]) | ||
return ", ".join(list(authors)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
selenium==3.141.0 | ||
selenium==3.141.0 | ||
requests==2.25.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Get Release Message | ||
on: workflow_dispatch | ||
jobs: | ||
build: | ||
name: Get Fonts From Icomoon | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- 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 | ||
pip install -r ./.github/scripts/requirements.txt | ||
- name: Run the get_release_message.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: python ./.github/scripts/get_release_message.py $GITHUB_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.