diff --git a/cli.mjs b/cli.mjs new file mode 100755 index 0000000..43f2ca0 --- /dev/null +++ b/cli.mjs @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import('./index.mjs') diff --git a/commands/tags/handler.mjs b/commands/tags/handler.mjs index e6e6c54..6f8f7e3 100644 --- a/commands/tags/handler.mjs +++ b/commands/tags/handler.mjs @@ -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) { diff --git a/package.json b/package.json index 6695f6e..850dd4c 100644 --- a/package.json +++ b/package.json @@ -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 .",