Skip to content

Commit 9c9d81d

Browse files
authored
Merge pull request #2164 from hydephp/fix-github-action-switched-to-esm
Internal: Fix GitHub action that switched to ESM
2 parents 6fee2ce + eb6f463 commit 9c9d81d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/scripts/RemoveStateLabels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = async ({github, context}) => {
1+
export default async function ({github, context}) {
22
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
33
issue_number: context.issue.number,
44
owner: context.repo.owner,

.github/workflows/label-pull-requests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
with:
2323
github-token: ${{ secrets.GITHUB_TOKEN }}
2424
script: |
25-
const script = require('./.github/scripts/LabelInternal.js');
26-
console.log(script({github, context}));
25+
const { default: script } = await import('./.github/scripts/RemoveStateLabels.js');
26+
await script({github, context});
2727
2828
# Remove "run-visual-tests" labels and similar when the pull request is closed
2929
- name: Remove state control labels
@@ -32,5 +32,5 @@ jobs:
3232
with:
3333
github-token: ${{ secrets.GITHUB_TOKEN }}
3434
script: |
35-
const script = require('./.github/scripts/RemoveStateLabels.js');
36-
await script({github, context});
35+
const { default: script } = await import('./.github/scripts/RemoveStateLabels.js');
36+
await script({github, context});

0 commit comments

Comments
 (0)