Skip to content

Commit e6891b8

Browse files
committed
Update index.ts
1 parent ec535aa commit e6891b8

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/index.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,12 @@ import actionsGithub from '@actions/github';
44

55
const token = actionsCore.getInput('token');
66
const organizationName = actionsCore.getInput('organization-name');
7-
const onlyPublicRepositories = actionsCore.getBooleanInput('only-public-repositories');
8-
const labelSearchPattern = actionsCore.getInput('label-search-pattern');
9-
const categories = actionsCore.getInput('categories');
7+
// const onlyPublicRepositories = actionsCore.getBooleanInput('only-public-repositories');
8+
// const labelSearchPattern = actionsCore.getInput('label-search-pattern');
9+
// const categories = actionsCore.getInput('categories');
1010

1111
const octokit = actionsGithub.getOctokit(token)
1212
octokit.rest.repos.listForOrg({org: organizationName}).then((response) => {
13-
const repositories = response.data.filter((repository) => {
14-
return onlyPublicRepositories ? repository.visibility === 'public' : true
15-
})
16-
const labels = repositories.map((repository) => {
17-
return octokit.rest.issues.listLabelsForRepo({owner: organizationName, repo: repository.name}).then((response) => {
18-
const labels = response.data.filter((label) => {
19-
return label.name.match(new RegExp(labelSearchPattern))
20-
})
21-
return labels
22-
})
23-
})
24-
console.log(labels);
13+
console.log(response.data);
2514

26-
Promise.all(labels).then((labels) => {
27-
actionsCore.setOutput('labels', JSON.stringify(labels))
28-
})
2915
})

0 commit comments

Comments
 (0)