{"id":20393047,"url":"https://github.com/aichbauer/node-tagged-git-commits","last_synced_at":"2025-04-12T11:54:31.559Z","repository":{"id":57376370,"uuid":"96012817","full_name":"aichbauer/node-tagged-git-commits","owner":"aichbauer","description":"Get the commit hash and refs/tag of tagged commits, remote and local","archived":false,"fork":false,"pushed_at":"2020-07-28T05:27:59.000Z","size":49,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T19:49:30.716Z","etag":null,"topics":["commit","git","git-tags","is-git","nodejs","repo","tag"],"latest_commit_sha":null,"homepage":"","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/aichbauer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-02T09:07:19.000Z","updated_at":"2017-07-02T09:36:46.000Z","dependencies_parsed_at":"2022-09-06T06:51:28.972Z","dependency_job_id":null,"html_url":"https://github.com/aichbauer/node-tagged-git-commits","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichbauer%2Fnode-tagged-git-commits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichbauer%2Fnode-tagged-git-commits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichbauer%2Fnode-tagged-git-commits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aichbauer%2Fnode-tagged-git-commits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aichbauer","download_url":"https://codeload.github.com/aichbauer/node-tagged-git-commits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565052,"owners_count":21125415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["commit","git","git-tags","is-git","nodejs","repo","tag"],"created_at":"2024-11-15T03:47:08.851Z","updated_at":"2025-04-12T11:54:31.534Z","avatar_url":"https://github.com/aichbauer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tagged-git-commits\n\nGet the commit hash and refs/tags of tagged commits, remote and local\n\n[![Build Status](https://travis-ci.org/aichbauer/node-tagged-git-commits.svg?branch=master)](https://travis-ci.org/aichbauer/node-tagged-git-commits)\n[![Build status](https://ci.appveyor.com/api/projects/status/f6bdyd0afwg1p36a/branch/master?svg=true)](https://ci.appveyor.com/project/aichbauer/node-tagged-git-commits/branch/master)\n[![Coverage Status](https://coveralls.io/repos/github/aichbauer/node-tagged-git-commits/badge.svg?branch=master)](https://coveralls.io/github/aichbauer/node-tagged-git-commits?branch=master)\n\n## Installation\n\n```sh\n$ npm i tagged-git-commits --save\n```\nor\n```sh\n$ yarn add tagged-git-commits\n```\n\n## Usage\n\n```js\nconst taggedCommits = require('tagged-git-commits');\n\n// the latest local tagged commit from process.cwd()\ntaggedCommits();\n\n// the latest local tagged commit from the repo './path/to/repo'\ntaggedCommits({\n  path: './path/to/repo',\n});\n\n// the latest 5 local tagged commits from process.cwd()\ntaggedCommits({\n  lookBehind: 5,\n});\n\n// the latest tagged commit from process.cwd() from remote origin\ntaggedCommits({\n  local: false,\n});\n\n// the latest tagged commit from process.cwd() from remote anotherOrigin\ntaggedCommits({\n  local: false,\n  remote: 'anotherOrigin'\n});\n\n// the latest 3 tagged commits from the repo './path/to/repo' from the remote origin\ntaggedCommits({\n  path: './path/to/repo',\n  lookBehind: 3,\n  local: false,\n  remote: 'origin',\n});\n```\n\nReturns an Array with objects.\n\n```js\n[\n  {\n    commit: '31107b9051efe17e57c583937e027993860b11a9',\n    shortCommit: '31107b9',\n    hash: '31107b9051efe17e57c583937e027993860b11a9',\n    shortHash: '31107b9',\n    version: 'v1.0.0',\n   refsTags: 'refs/tags/v1.0.0',\n  },\n]\n```\n\n## LICENSE\n\nMIT © Lukas Aichbauer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faichbauer%2Fnode-tagged-git-commits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faichbauer%2Fnode-tagged-git-commits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faichbauer%2Fnode-tagged-git-commits/lists"}