{"id":25751944,"url":"https://github.com/shuttersh/git-links","last_synced_at":"2025-10-30T20:35:41.070Z","repository":{"id":57251086,"uuid":"138688611","full_name":"shuttersh/git-links","owner":"shuttersh","description":"Normalize git URLs to shorthand format and denormalize to repo, branch or PR links.","archived":false,"fork":false,"pushed_at":"2018-06-26T05:41:30.000Z","size":44,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T14:04:14.708Z","etag":null,"topics":["bitbucket","git","github","gitlab","url-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shuttersh.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}},"created_at":"2018-06-26T05:24:46.000Z","updated_at":"2024-08-10T08:18:54.000Z","dependencies_parsed_at":"2022-08-24T16:51:56.915Z","dependency_job_id":null,"html_url":"https://github.com/shuttersh/git-links","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/shuttersh%2Fgit-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuttersh%2Fgit-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuttersh%2Fgit-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuttersh%2Fgit-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuttersh","download_url":"https://codeload.github.com/shuttersh/git-links/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240654738,"owners_count":19835955,"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":["bitbucket","git","github","gitlab","url-parser"],"created_at":"2025-02-26T14:18:44.382Z","updated_at":"2025-10-30T20:35:41.011Z","avatar_url":"https://github.com/shuttersh.png","language":"TypeScript","readme":"# git-links [![Build Status](https://travis-ci.org/shuttersh/git-links.svg?branch=master)](https://travis-ci.org/shuttersh/git-links) [![NPM Version](https://img.shields.io/npm/v/git-links.svg)](https://www.npmjs.com/package/git-links)\n\nParse git remote URLs to shorthand format as used in the package.json `repository` field and resolve shorthand links to full URLs.\n\nGreat for normalizing and denormalizing links to repositories, branches and pull requests.\n\n\n## Installation\n\n```sh\n$ npm install git-links\n# or using yarn:\n$ yarn add git-links\n```\n\n\n## Usage\n\n```js\nimport { getShortLink, getBranchPageLink, getPullRequestLink, getRepoPageLink } from 'git-links'\n\ngetShortLink('git@github.com:piuccio/cowsay.git')\n// =\u003e 'github:piuccio/cowsay'\ngetShortLink('https://gitlab.com/gitlab-org/gitlab-ce.git')\n// =\u003e 'gitlab:gitlab-org/gitlab-ce'\n\ngetRepoPageLink('git@github.com:piuccio/cowsay.git')\n// =\u003e 'https://github.com/piuccio/cowsay'\ngetRepoPageLink('github:facebook/react')\n// =\u003e 'https://github.com/facebook/react'\n\ngetBranchPageLink('github:facebook/react', '15-stable')\n// =\u003e 'https://github.com/facebook/react/tree/15-stable'\n\ngetPullRequestLink('bitbucket:ftrack/ftrack-connect', '227')\n// =\u003e 'https://bitbucket.org/ftrack/ftrack-connect/pull-requests/227'\n```\n\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttersh%2Fgit-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuttersh%2Fgit-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttersh%2Fgit-links/lists"}