Skip to content

Commit 5bd693f

Browse files
authored
Update check-latest-release.yml
1 parent 105f27d commit 5bd693f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/check-latest-release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ jobs:
2525
- name: Run release URL checker
2626
run: |
2727
node <<'EOF'
28-
const { Octokit } = require("@octokit/rest");
2928
const fs = require("fs");
3029
31-
const octokit = new Octokit();
32-
const readme = fs.readFileSync("README.md", "utf-8");
30+
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
3331
34-
const regex = /- ### (.*?)(https:\/\/github\.com\/.*?).*?\n.*?!.*?(https:\/\/github\.com\/.*?\/releases.*?)/g;
35-
let match;
32+
const checkLatestRelease = async () => {
33+
const { Octokit } = await import("@octokit/rest");
34+
const octokit = new Octokit();
35+
const readme = fs.readFileSync("README.md", "utf-8");
3636
37-
let allCorrect = true;
38-
let annotations = [];
37+
const regex = /- ### (.*?)(https:\/\/github\.com\/.*?).*?\n.*?!.*?(https:\/\/github\.com\/.*?\/releases.*?)/g;
38+
let match;
3939
40-
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
40+
let allCorrect = true;
41+
let annotations = [];
4142
42-
const checkLatestRelease = async () => {
4343
while ((match = regex.exec(readme)) !== null) {
4444
const pluginName = match[1];
4545
const repoUrl = match[2];

0 commit comments

Comments
 (0)