Skip to content

Commit a6d995c

Browse files
committed
Update index.ts
1 parent 77dd7db commit a6d995c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ const categories = actionsCore.getInput('categories');
1010

1111
const octokit = actionsGithub.getOctokit(token)
1212
octokit.rest.repos.listForOrg({org: organizationName}).then((response) => {
13-
response.data.forEach((repo) => {
14-
if (onlyPublicRepositories && repo.private) {
13+
response.data.forEach((repository) => {
14+
if (onlyPublicRepositories && repository.private) {
1515
return;
1616
}
1717

18-
octokit.rest.issues.listLabelsForRepo({owner: organizationName, repo: repo.name}).then((labels) => {
18+
octokit.rest.issues.listLabelsForRepo({owner: organizationName, repo: repository.name}).then((labels) => {
1919
const categoryLabel = labels.data.filter((label) => label.name.match(new RegExp(labelSearchPattern)))[0];
2020

2121
if (!categoryLabel) {
2222
return;
2323
}
2424

25-
console.log(categoryLabel.description?.split(',').map((category) => category.trim()));
26-
25+
console.log(repository.name, categoryLabel.description?.split(',').map((category) => category.trim()));
2726
})
2827
})
2928
})

0 commit comments

Comments
 (0)