{"id":19649108,"url":"https://github.com/toxic-johann/git-prefix-tag","last_synced_at":"2026-07-02T09:32:57.209Z","repository":{"id":89048892,"uuid":"118631829","full_name":"toxic-johann/git-prefix-tag","owner":"toxic-johann","description":"get git tags with prefix","archived":false,"fork":false,"pushed_at":"2020-05-26T21:27:58.000Z","size":157,"stargazers_count":3,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T00:49:40.719Z","etag":null,"topics":["git-tag","git-tags","node-github"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toxic-johann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-23T15:47:18.000Z","updated_at":"2023-03-04T06:00:43.000Z","dependencies_parsed_at":"2023-06-25T22:16:08.651Z","dependency_job_id":null,"html_url":"https://github.com/toxic-johann/git-prefix-tag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toxic-johann/git-prefix-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Fgit-prefix-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Fgit-prefix-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Fgit-prefix-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Fgit-prefix-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toxic-johann","download_url":"https://codeload.github.com/toxic-johann/git-prefix-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Fgit-prefix-tag/sbom","scorecard":{"id":895810,"data":{"date":"2025-08-11","repo":{"name":"github.com/toxic-johann/git-prefix-tag","commit":"515c3eb8b3437b3756e8b3f4d8abe3df1fae8958"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T13:39:54.051Z","repository_id":89048892,"created_at":"2025-08-24T13:39:54.052Z","updated_at":"2025-08-24T13:39:54.052Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35041996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git-tag","git-tags","node-github"],"created_at":"2024-11-11T14:51:37.376Z","updated_at":"2026-07-02T09:32:57.203Z","avatar_url":"https://github.com/toxic-johann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-prefix-tag\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/toxic-johann/git-prefix-tag.svg)](https://greenkeeper.io/)\n\nget git tags with prefix\n\n## Install\n\n```sh\n$ npm install git-prefix-tag --save-dev\n```\n\n## Usage\n\nAssume you have tags like below\n\n\u003e4de0361ae9c51f51fb6d3a50addfff6ca2d64a99\trefs/tags/dev-v0.0.1\n\u003e9ec697394a8def124f5b7c85e27a991adbff2c86\trefs/tags/dev-v0.1.1\n\u003e3dbfd9dbce2f48c68051d025e037b54bc17b015a\trefs/tags/dev-v0.1.2\n\u003e5409b3f8b96087d73973efdacc0a290b873612e3\trefs/tags/dev-v0.1.3\n\u003e364a61ea754e8150e3bf460bc37709732260a851\trefs/tags/prod-v0.1.0\n\u003ea0ebc1571e2c69725877191d688c815701a49e78\trefs/tags/prod-v0.1.1\n\u003ea0ebc1571e2c69725877191d688c815701a49e78\trefs/tags/sth-werid\n\u003ed5b47d82ecd19b5c19fe2bd28294ad887968a5aa\trefs/tags/prod-v0.1.2\n\u003e10817d87a8182d2a72b174ffb70b879555a2b73c\trefs/tags/prod-v0.1.3-alpha\n\u003e45a75e99ea1a6c333eadf81bdbfac164f6613955\trefs/tags/prod-v0.1.4-beta\n\u003e702139d72160a729854e3adbc62a2955f87e212b\trefs/tags/prod-v0.1.5\n\u003e984e86d46ef724d4d06026740624cce5ecdb59fd\trefs/tags/prod-v0.1.6-beta\n\nYou can use `git-prefix-tag` to fetch the tag you want.\n\n### getLatest\n\nThis function definition is below.\n\n```typescript\nfunction getLatest(prefix: string | regExp | Function, options: {\n    semver: boolean = false,\n    wholeVersion: boolean = false,\n    withPrefix: boolean = false,\n    all: boolean = false,\n})： string | semver {}\n```\n\nYou can use getLatest to get the latest version.\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.getLatest('dev-v')); // 0.1.3\n```\n\n#### Options\n\nThere are several options here.\n\n**withPrefix**\n\nYou can add withPrefix option to get the whole tag\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.getLatest('dev-v', { withPrefix: true })); // dev-v0.1.3\n```\n\n**semver**\n\nYou can get a semver object.\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.getLatest('dev-v', { semver: true }));\n/*\n{\n  \"semver\": {\n    \"raw\": \"0.1.3\",\n    \"major\": 0,\n    \"minor\": 1,\n    \"patch\": 3,\n    \"prerelease\": [],\n    \"build\": [],\n    \"version\": \"0.1.3\"\n  },\n  \"wholeVersion\": \"0.1.3\",\n  \"prefix\": \"dev-v\",\n  \"tag\": \"dev-v0.1.3\",\n  \"version\": \"0.1.3\"\n}\n*/\n```\n\n#### Input\n\nyou can custom your input\n\n**RegExp**\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.getLatest(/dev-v/)); // 0.1.3\n```\n\n**Function**\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.getLatest(() =\u003e 'dev-v'))); // 0.1.3\n```\n\n### increase\n\nYou can get the increace tag based on the latest tag through this function. Its definition is like this.\n\n```javascript\nfunction increase(prefix: string | regExp | Function, type: 'major' | 'premajor' | 'minor' | 'preminor' | 'patch' | 'prepatch' | 'prerelease' = 'patch'): string {}\n```\n\nYou can use like this.\n\n```javascript\nconst helper = require('git-prefix-tag');\nconsole.log(helper.increase('dev-v')); // '0.1.4'\nconsole.log(helper.increase('dev-v', 'minor')); // '0.2.0'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxic-johann%2Fgit-prefix-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoxic-johann%2Fgit-prefix-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxic-johann%2Fgit-prefix-tag/lists"}