Skip to content

Commit bc4b5af

Browse files
committed
Update index.ts
1 parent eb6fdcc commit bc4b5af

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/index.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ octokit.rest.repos.listForOrg({org: config.organizationName}).then(async (respon
4545
actionsCore.endGroup();
4646
continue;
4747
}
48-
49-
actionsCore.info('Searching for labels in the repository...');
5048

5149
await octokit.rest.issues.listLabelsForRepo({owner: config.organizationName, repo: repository.name}).then((response) => {
5250
const categoryLabel = response.data.filter((label) => config.labelSearchPattern.test(label.name))[0];
@@ -61,19 +59,19 @@ octokit.rest.repos.listForOrg({org: config.organizationName}).then(async (respon
6159

6260
actionsCore.info(`Found label: ${JSON.stringify(categoryLabel)}`)
6361

64-
// const name = repository.name;
65-
// const categories = categoryLabel.description?.split(',').map((category) => category.trim()) ?? [];
62+
const name = repository.name;
63+
const categories = categoryLabel.description?.split(',').map((category) => category.trim()) ?? [];
6664

67-
// if (categories.length === 0) {
68-
// actionsCore.warning(
69-
// `Ignoring repository "${repository.name}", because it has no categories.`,
70-
// {title: 'No categories provided'}
71-
// );
72-
// return;
73-
// }
65+
if (categories.length === 0) {
66+
actionsCore.warning(
67+
`Ignoring repository "${repository.name}", because it has no categories.`,
68+
{title: 'No categories provided'}
69+
);
70+
return;
71+
}
7472

75-
// actionsCore.info(name)
76-
// actionsCore.info(categories.join(', '))
73+
actionsCore.info(name)
74+
actionsCore.info(categories.join(', '))
7775
})
7876

7977
actionsCore.endGroup();

0 commit comments

Comments
 (0)