Skip to content

Commit 1dc9f48

Browse files
committed
feat: set output path to project directory & streamline output props
1 parent 9b37cfb commit 1dc9f48

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/workflows/emoji-data-updater.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: "0 2 * * 5"
7-
7+
88
jobs:
99
update-emoji-json:
1010
runs-on: ubuntu-latest
1111
env:
12-
VERSION:
13-
RELEASE_URL:
12+
VERSION: ''
13+
RELEASE_URL: ''
1414
WORKING_DIR: scripts/emoji_generator
1515
steps:
1616
- name: Checkout Repository
@@ -40,7 +40,9 @@ jobs:
4040
env:
4141
PYTHONUNBUFFERED: 1
4242
EMOJI_VERSION: ${{ env.VERSION }}
43-
run: poetry run python ${{ env.WORKING_DIR }}/emoji_generator/generator.py
43+
run: |
44+
cd ${{ env.WORKING_DIR }}
45+
poetry run python emoji_generator/generator.py
4446
4547
- name: Push Changes and Create PR
4648
uses: peter-evans/create-pull-request@v7
@@ -49,7 +51,7 @@ jobs:
4951
title: "Update emoji.json to emojibase-data@${{ env.VERSION }}"
5052
body: |
5153
This PR updates emoji.json to the latest version of emojibase-data: `emojibase-data@${{ env.VERSION }}`.
52-
54+
5355
You can review the release notes [here](${{ env.RELEASE_URL }}).
5456
branch: dependencies/emoji-base-updates
5557
author: GitHub <[email protected]>
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.6

scripts/emoji_generator/emoji_generator/generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize() -> NoReturn:
2727

2828
emoji_output = fetch_emoji_data()
2929

30-
output_path = 'emojify/src/main/assets/emoticons/emoji.json'
30+
output_path = '../../emojify/src/main/assets/emoticons/emoji.json'
3131
os.makedirs(os.path.dirname(output_path), exist_ok=True)
3232

3333
with open(output_path, 'w', encoding='utf-8') as stream:

scripts/emoji_generator/emoji_generator/utils.py

-3
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ def parse_emoji_data(data: List[Emoji]) -> List[Dict]:
6060
result: Dict = {
6161
"emoji": item.emoji,
6262
"description": item.label,
63-
"group": item.group.name if item.group is not None else None,
64-
"subgroup": item.subgroup.name if item.subgroup is not None else None,
6563
"tags": item.tags,
6664
"unicode": compute_unicode(normalized_emoji),
67-
"gender": item.gender.name if item.gender is not None else None,
6865
"htmlDec": compute_html_dec(normalized_emoji),
6966
"htmlHex": compute_html_hex(normalized_emoji),
7067
"supportsFitzpatrick": len(item.skins) > 0 if item.skins is not None else None,

0 commit comments

Comments
 (0)