Skip to content

Commit

Permalink
ci: fix emoji update action (#260)
Browse files Browse the repository at this point in the history
This commit ensures that the emoji update action is compatible with the
new GitHub action runner and @octokit/core library.
  • Loading branch information
rickstaa authored Jun 2, 2024
1 parent 5edaed5 commit 1529d22
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_emojis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"

- name: Install dependencies
run: npm ci
Expand Down
130 changes: 107 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "github-emoji-picker",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"all": "npm run build && npm run format && npm run lint && npm run test:ci",
"build": "react-scripts build",
Expand Down Expand Up @@ -40,7 +41,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.0",
"@mui/material": "^5.15.0",
"@octokit/core": "^6.1.0",
"@octokit/core": "^6.1.2",
"all-iso-language-codes": "^1.0.11",
"emoji-datasource": "^15.1.0",
"emoji-mart": "^5.5.1",
Expand Down
16 changes: 8 additions & 8 deletions scripts/create_github_emoji_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* the 'emoji-datasource' package and generate the `github_emojis.json` and
* `github_custom_emojis.json` data files.
*/
const { mkdir, writeFile } = require("fs");
const inflection = require("inflection"); // Keyword support library.
const emojiLib = require("emojilib"); // Emoji data search library.
const emojiData = require("emoji-datasource"); // Multi-OS emoji data.
const unicodeEmoji = require("unicode-emoji-json"); // Unicode emoji data.
const { Octokit } = require("@octokit/core");
const CustomKeyWords = require("./keywords.json");
import { mkdir, writeFile } from 'fs';
import inflection from 'inflection'; // Keyword support library.
import emojiLib from 'emojilib' assert { type: 'json' }; // Emoji data search library.
import emojiData from 'emoji-datasource' assert { type: 'json' }; // Multi-OS emoji data.
import unicodeEmoji from 'unicode-emoji-json' assert { type: 'json' }; // Unicode emoji data.
import { Octokit } from '@octokit/core';
import CustomKeyWords from './keywords.json' assert { type: 'json' };

// Script variables
const DRY_RUN = process.argv.indexOf("--dry") !== -1;
Expand Down Expand Up @@ -396,7 +396,7 @@ const run = async () => {
try {
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});
});
githubEmojis = await octokit.request("GET /emojis", {});
} catch (error) {
console.error("Could not retrieve GitHub emoji data.");
Expand Down
2 changes: 1 addition & 1 deletion src/data/github_emojis.json

Large diffs are not rendered by default.

0 comments on commit 1529d22

Please sign in to comment.