From 84f0b44163aa051ca834e6737503f0a2d0008b10 Mon Sep 17 00:00:00 2001 From: Mathys-Gasnier Date: Wed, 1 Jan 2025 20:22:28 +0100 Subject: [PATCH 1/2] Sending the result of `check-snippet` CI in the concerned PR --- .github/workflows/check-snippets.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-snippets.yml b/.github/workflows/check-snippets.yml index 5fb67bd7..8f82ea53 100644 --- a/.github/workflows/check-snippets.yml +++ b/.github/workflows/check-snippets.yml @@ -9,6 +9,10 @@ jobs: check-snippets: runs-on: ubuntu-latest + permissions: + content: read + pull-requests: write + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -19,5 +23,9 @@ jobs: node-version: "16" - name: Check if snippets are formated correctly - run: | - node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder + uses: int128/comment-action@v1 + with: + run: node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder + post-on-failure: | + ## :x: Snipper Format Error + ${run.output} \ No newline at end of file From eba23a148906e17588d217908bad4b9d856e77b8 Mon Sep 17 00:00:00 2001 From: Mathys-Gasnier Date: Wed, 1 Jan 2025 22:01:46 +0100 Subject: [PATCH 2/2] Updates CI to use latest LTS node version --- .github/workflows/check-snippets.yml | 6 +++--- .github/workflows/consolidate-snippets.yml | 6 +++--- src/hooks/useLanguages.ts | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-snippets.yml b/.github/workflows/check-snippets.yml index 8f82ea53..25e15f6d 100644 --- a/.github/workflows/check-snippets.yml +++ b/.github/workflows/check-snippets.yml @@ -15,12 +15,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 22 - name: Check if snippets are formated correctly uses: int128/comment-action@v1 diff --git a/.github/workflows/consolidate-snippets.yml b/.github/workflows/consolidate-snippets.yml index 507a51bd..62c794f7 100644 --- a/.github/workflows/consolidate-snippets.yml +++ b/.github/workflows/consolidate-snippets.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 22 - name: Install dependencies run: | diff --git a/src/hooks/useLanguages.ts b/src/hooks/useLanguages.ts index dc669f61..0389ac44 100644 --- a/src/hooks/useLanguages.ts +++ b/src/hooks/useLanguages.ts @@ -3,8 +3,9 @@ import { LanguageType } from "@types"; import { useFetch } from "./useFetch"; export const useLanguages = () => { - const { data, loading, error } = - useFetch("/consolidated/_index.json"); + const { data, loading, error } = useFetch( + "/consolidated/_index.json" + ); return { fetchedLanguages: data || [], loading, error }; };

AltStyle によって変換されたページ (->オリジナル) /