Skip to content

Commit 69a84f3

Browse files
committed
ci: updated cjs to esm
1 parent 7ae2bbc commit 69a84f3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/label-checker.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const github = require('@actions/github');
2-
const core = require('@actions/core');
1+
import { getOctokit, context } from '@actions/github';
2+
import { setFailed } from '@actions/core';
33

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

9-
const pullRequest = github.context.payload.pull_request;
9+
const pullRequest = context.payload.pull_request;
1010
const owner = pullRequest.base.repo.owner.login;
1111
const repo = pullRequest.base.repo.name;
1212
const pullNumber = pullRequest.number;
@@ -30,12 +30,12 @@ async function run() {
3030
);
3131

3232
if (!hasRequiredLabels) {
33-
core.setFailed(
33+
setFailed(
3434
'This pull request must have at least one label from each of the following groups: Type (Easy, Medium, Hard), Semver (Major, Minor, Patch), and PR:Accept.'
3535
);
3636
}
3737
} catch (error) {
38-
core.setFailed(error.message);
38+
setFailed(error.message);
3939
}
4040
}
4141

0 commit comments

Comments
 (0)