From 4194855a63749840fb0b3239e8f6daf56d5b348a Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 21 May 2024 17:31:06 +0200 Subject: [PATCH] GH Action: Load modules in the ES way to fix the `ERR_REQUIRE_ESM` error TBH, I have no idea what I am doing --- .github/actions/forward-project-field.js | 2 +- .github/actions/score-triaged-defects.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/forward-project-field.js b/.github/actions/forward-project-field.js index 1c54277..33f4cb3 100644 --- a/.github/actions/forward-project-field.js +++ b/.github/actions/forward-project-field.js @@ -1,4 +1,4 @@ -const { Octokit } = require("@octokit/action"); +import { Octokit } from "@octokit/action"; const octokit = new Octokit(); diff --git a/.github/actions/score-triaged-defects.js b/.github/actions/score-triaged-defects.js index 3f0140f..5b9306b 100644 --- a/.github/actions/score-triaged-defects.js +++ b/.github/actions/score-triaged-defects.js @@ -16,11 +16,11 @@ limitations under the License. // For running in an action -const { Octokit } = require("@octokit/action"); +import { Octokit } from "@octokit/action"; const octokit = new Octokit(); // For running locally -// const { Octokit } = require("@octokit/core"); +// import { Octokit } from "@octokit/core"; // const octokit = new Octokit({ auth: process.env.GH_TOKEN });