Skip to content

Commit 7312763

Browse files
committed
fix: avoid unnecessary pagination
1 parent 903a0c2 commit 7312763

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const inputFile = null;
1212
// const inputFile = "./wcag-evaluation.json";
1313
const outputFile = join(tmpdir(), "wcag-evaluation.json");
1414
const owner = "frameless";
15-
const repo = "wcag-issues-action";
15+
const repo = "strapi";
1616
const labelColor = "D93F0B";
1717
const website = "https://github.com/frameless/wcag-issues-action";
1818
const token = process.env.GITHUB_TOKEN;
@@ -24,7 +24,7 @@ const title = "GitHub Action for WCAG reports in GitHub Issues";
2424
const octokit = await login({ token });
2525

2626
if (createNewLabels) {
27-
createWcagLabels({ octokit, owner, repo, color: labelColor });
27+
await createWcagLabels({ octokit, owner, repo, color: labelColor });
2828
}
2929

3030
const auditResult = await loadWcagIssues({ owner, repo, octokit, website });

src/lib.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export const createWcagLabels = async ({ octokit, owner, repo, color }) => {
5050
);
5151
}
5252

53-
const createResult = await Promise.all(
53+
await Promise.all(
5454
newLabels.map(({ name, description }) =>
55-
octokit.paginate(octokit.rest.issues.createLabel, {
55+
octokit.rest.issues.createLabel({
5656
owner,
5757
repo,
5858
name,

0 commit comments

Comments
 (0)