Skip to content

Commit 7a9f7c4

Browse files
authored
Merge pull request #31 from OPCODE-Open-Spring-Fest/fix/label-checker-cjs
Fix/label checker cjs
2 parents fefcc03 + df588c5 commit 7a9f7c4

4 files changed

Lines changed: 343 additions & 135 deletions

File tree

.github/workflows/checklabels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Install dependencies
1717
run: npm install @actions/github @actions/core
1818
- name: Run Label Checker
19-
run: node .github/workflows/label-checker.js
19+
run: node .github/workflows/label-checker.cjs
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { getOctokit, context } from '@actions/github';
2-
import { setFailed } from '@actions/core';
1+
const { getOctokit, context } = require('@actions/github');
2+
const { setFailed } = require('@actions/core');
33

44
async function run() {
55
try {
66
const token = process.env.GITHUB_TOKEN;
7-
const octokit = new getOctokit(token);
7+
const octokit = getOctokit(token);
88

99
const pullRequest = context.payload.pull_request;
1010
const owner = pullRequest.base.repo.owner.login;
@@ -39,4 +39,4 @@ async function run() {
3939
}
4040
}
4141

42-
run();
42+
run();

0 commit comments

Comments
 (0)