Skip to content

Commit

Permalink
fix: bin and filter
Browse files Browse the repository at this point in the history
  • Loading branch information
gbertoncelli committed Feb 20, 2024
1 parent 061abe0 commit aa8ee8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
import('./index.mjs')
8 changes: 7 additions & 1 deletion commands/tags/handler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ export default async function run (argv) {

for await (const response of iterateRepos(argv, octo)) {
for (const repo of response.data) {
const filterRegex = new RegExp(argv.filter)
if (argv.filter && !(filterRegex.test(repo.name))) {
continue
}

const tags = await listTags(argv, octo, {
owner: repo.owner.login,
repo: repo.name
repo: repo.name,
per_page: 2
})

if (!tags.length) {
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"description": "",
"main": "index.mjs",
"type": "module",
"bin": "cli.mjs",
"engines": {
"node": ">=16"
},
"scripts": {
"test": "exit 0",
"version": "git branch -D 'release_'$npm_package_version || true && git checkout -b 'release_'$npm_package_version && changelogger -p && git add .",
Expand Down

0 comments on commit aa8ee8e

Please sign in to comment.