{"action":"created","comment":{"url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/comments/59123401","id":59123401,"diff_hunk":"@@ -109,3 +90,9 @@ it('should error if cannot get repository', function() {\n     getPkgRepo({});\n   });\n });\n+\n+it('should parse github enterprise http url', function() {\n+  var url = 'http://github.mycompany.dev/user/myRepo';","path":"test.js","position":116,"original_position":116,"commit_id":"906d3ecb6fcd9c97f0c821efab9360c42d164d88","original_commit_id":"906d3ecb6fcd9c97f0c821efab9360c42d164d88","user":{"login":"stevemao","id":6316590,"avatar_url":"https://avatars.githubusercontent.com/u/6316590?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemao","html_url":"https://github.com/stevemao","followers_url":"https://api.github.com/users/stevemao/followers","following_url":"https://api.github.com/users/stevemao/following{/other_user}","gists_url":"https://api.github.com/users/stevemao/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemao/subscriptions","organizations_url":"https://api.github.com/users/stevemao/orgs","repos_url":"https://api.github.com/users/stevemao/repos","events_url":"https://api.github.com/users/stevemao/events{/privacy}","received_events_url":"https://api.github.com/users/stevemao/received_events","type":"User","site_admin":false},"body":"I realise other tests only test \r\n`repo.type` and `repo.browse()`. Feel free to add a few more :)","created_at":"2016-04-09T23:12:52Z","updated_at":"2016-04-09T23:12:52Z","html_url":"https://github.com/stevemao/get-pkg-repo/pull/4#discussion_r59123401","pull_request_url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/comments/59123401"},"html":{"href":"https://github.com/stevemao/get-pkg-repo/pull/4#discussion_r59123401"},"pull_request":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4","id":65784963,"html_url":"https://github.com/stevemao/get-pkg-repo/pull/4","diff_url":"https://github.com/stevemao/get-pkg-repo/pull/4.diff","patch_url":"https://github.com/stevemao/get-pkg-repo/pull/4.patch","issue_url":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/4","number":4,"state":"open","locked":false,"title":"Include support GitHub Enterprise Edition","user":{"login":"thiagofelix","id":117622,"avatar_url":"https://avatars.githubusercontent.com/u/117622?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagofelix","html_url":"https://github.com/thiagofelix","followers_url":"https://api.github.com/users/thiagofelix/followers","following_url":"https://api.github.com/users/thiagofelix/following{/other_user}","gists_url":"https://api.github.com/users/thiagofelix/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagofelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagofelix/subscriptions","organizations_url":"https://api.github.com/users/thiagofelix/orgs","repos_url":"https://api.github.com/users/thiagofelix/repos","events_url":"https://api.github.com/users/thiagofelix/events{/privacy}","received_events_url":"https://api.github.com/users/thiagofelix/received_events","type":"User","site_admin":false},"body":"Add dependency with [bahmutov/parse-github-repo-url](https://github.com/bahmutov/parse-github-repo-url) to fallback when impossible to parse using [npm/hosted-git-info](https://github.com/npm/hosted-git-info).\r\n\r\nIt adds support to Github Enterprise like urls.\r\n\r\nCloses #3 ","created_at":"2016-04-08T13:21:20Z","updated_at":"2016-04-09T23:12:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e66eedae969aca02d20df1e684045056f933fae4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4/commits","review_comments_url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4/comments","review_comment_url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/4/comments","statuses_url":"https://api.github.com/repos/stevemao/get-pkg-repo/statuses/906d3ecb6fcd9c97f0c821efab9360c42d164d88","head":{"label":"thiagofelix:ghe","ref":"ghe","sha":"906d3ecb6fcd9c97f0c821efab9360c42d164d88","user":{"login":"thiagofelix","id":117622,"avatar_url":"https://avatars.githubusercontent.com/u/117622?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagofelix","html_url":"https://github.com/thiagofelix","followers_url":"https://api.github.com/users/thiagofelix/followers","following_url":"https://api.github.com/users/thiagofelix/following{/other_user}","gists_url":"https://api.github.com/users/thiagofelix/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagofelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagofelix/subscriptions","organizations_url":"https://api.github.com/users/thiagofelix/orgs","repos_url":"https://api.github.com/users/thiagofelix/repos","events_url":"https://api.github.com/users/thiagofelix/events{/privacy}","received_events_url":"https://api.github.com/users/thiagofelix/received_events","type":"User","site_admin":false},"repo":{"id":55777504,"name":"get-pkg-repo","full_name":"thiagofelix/get-pkg-repo","owner":{"login":"thiagofelix","id":117622,"avatar_url":"https://avatars.githubusercontent.com/u/117622?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagofelix","html_url":"https://github.com/thiagofelix","followers_url":"https://api.github.com/users/thiagofelix/followers","following_url":"https://api.github.com/users/thiagofelix/following{/other_user}","gists_url":"https://api.github.com/users/thiagofelix/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagofelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagofelix/subscriptions","organizations_url":"https://api.github.com/users/thiagofelix/orgs","repos_url":"https://api.github.com/users/thiagofelix/repos","events_url":"https://api.github.com/users/thiagofelix/events{/privacy}","received_events_url":"https://api.github.com/users/thiagofelix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thiagofelix/get-pkg-repo","description":"Get repository url from package json data","fork":true,"url":"https://api.github.com/repos/thiagofelix/get-pkg-repo","forks_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/forks","keys_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/teams","hooks_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/hooks","issue_events_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/issues/events{/number}","events_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/events","assignees_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/assignees{/user}","branches_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/branches{/branch}","tags_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/tags","blobs_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/statuses/{sha}","languages_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/languages","stargazers_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/stargazers","contributors_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/contributors","subscribers_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/subscribers","subscription_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/subscription","commits_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/contents/{+path}","compare_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/merges","archive_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/downloads","issues_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/issues{/number}","pulls_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/pulls{/number}","milestones_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/milestones{/number}","notifications_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/labels{/name}","releases_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/releases{/id}","deployments_url":"https://api.github.com/repos/thiagofelix/get-pkg-repo/deployments","created_at":"2016-04-08T12:31:12Z","updated_at":"2016-04-08T12:31:13Z","pushed_at":"2016-04-09T22:44:35Z","git_url":"git://github.com/thiagofelix/get-pkg-repo.git","ssh_url":"git@github.com:thiagofelix/get-pkg-repo.git","clone_url":"https://github.com/thiagofelix/get-pkg-repo.git","svn_url":"https://github.com/thiagofelix/get-pkg-repo","homepage":"","size":24,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stevemao:master","ref":"master","sha":"dcaf92e87903a9315344f5c53919009702132f5d","user":{"login":"stevemao","id":6316590,"avatar_url":"https://avatars.githubusercontent.com/u/6316590?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemao","html_url":"https://github.com/stevemao","followers_url":"https://api.github.com/users/stevemao/followers","following_url":"https://api.github.com/users/stevemao/following{/other_user}","gists_url":"https://api.github.com/users/stevemao/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemao/subscriptions","organizations_url":"https://api.github.com/users/stevemao/orgs","repos_url":"https://api.github.com/users/stevemao/repos","events_url":"https://api.github.com/users/stevemao/events{/privacy}","received_events_url":"https://api.github.com/users/stevemao/received_events","type":"User","site_admin":false},"repo":{"id":31355887,"name":"get-pkg-repo","full_name":"stevemao/get-pkg-repo","owner":{"login":"stevemao","id":6316590,"avatar_url":"https://avatars.githubusercontent.com/u/6316590?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemao","html_url":"https://github.com/stevemao","followers_url":"https://api.github.com/users/stevemao/followers","following_url":"https://api.github.com/users/stevemao/following{/other_user}","gists_url":"https://api.github.com/users/stevemao/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemao/subscriptions","organizations_url":"https://api.github.com/users/stevemao/orgs","repos_url":"https://api.github.com/users/stevemao/repos","events_url":"https://api.github.com/users/stevemao/events{/privacy}","received_events_url":"https://api.github.com/users/stevemao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevemao/get-pkg-repo","description":"Get repository url from package json data","fork":false,"url":"https://api.github.com/repos/stevemao/get-pkg-repo","forks_url":"https://api.github.com/repos/stevemao/get-pkg-repo/forks","keys_url":"https://api.github.com/repos/stevemao/get-pkg-repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevemao/get-pkg-repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevemao/get-pkg-repo/teams","hooks_url":"https://api.github.com/repos/stevemao/get-pkg-repo/hooks","issue_events_url":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/events{/number}","events_url":"https://api.github.com/repos/stevemao/get-pkg-repo/events","assignees_url":"https://api.github.com/repos/stevemao/get-pkg-repo/assignees{/user}","branches_url":"https://api.github.com/repos/stevemao/get-pkg-repo/branches{/branch}","tags_url":"https://api.github.com/repos/stevemao/get-pkg-repo/tags","blobs_url":"https://api.github.com/repos/stevemao/get-pkg-repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevemao/get-pkg-repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevemao/get-pkg-repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevemao/get-pkg-repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevemao/get-pkg-repo/statuses/{sha}","languages_url":"https://api.github.com/repos/stevemao/get-pkg-repo/languages","stargazers_url":"https://api.github.com/repos/stevemao/get-pkg-repo/stargazers","contributors_url":"https://api.github.com/repos/stevemao/get-pkg-repo/contributors","subscribers_url":"https://api.github.com/repos/stevemao/get-pkg-repo/subscribers","subscription_url":"https://api.github.com/repos/stevemao/get-pkg-repo/subscription","commits_url":"https://api.github.com/repos/stevemao/get-pkg-repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevemao/get-pkg-repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevemao/get-pkg-repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevemao/get-pkg-repo/contents/{+path}","compare_url":"https://api.github.com/repos/stevemao/get-pkg-repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevemao/get-pkg-repo/merges","archive_url":"https://api.github.com/repos/stevemao/get-pkg-repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevemao/get-pkg-repo/downloads","issues_url":"https://api.github.com/repos/stevemao/get-pkg-repo/issues{/number}","pulls_url":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls{/number}","milestones_url":"https://api.github.com/repos/stevemao/get-pkg-repo/milestones{/number}","notifications_url":"https://api.github.com/repos/stevemao/get-pkg-repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevemao/get-pkg-repo/labels{/name}","releases_url":"https://api.github.com/repos/stevemao/get-pkg-repo/releases{/id}","deployments_url":"https://api.github.com/repos/stevemao/get-pkg-repo/deployments","created_at":"2015-02-26T07:37:34Z","updated_at":"2016-02-03T11:37:28Z","pushed_at":"2016-04-09T22:44:36Z","git_url":"git://github.com/stevemao/get-pkg-repo.git","ssh_url":"git@github.com:stevemao/get-pkg-repo.git","clone_url":"https://github.com/stevemao/get-pkg-repo.git","svn_url":"https://github.com/stevemao/get-pkg-repo","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4"},"html":{"href":"https://github.com/stevemao/get-pkg-repo/pull/4"},"issue":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/4"},"comments":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/stevemao/get-pkg-repo/statuses/906d3ecb6fcd9c97f0c821efab9360c42d164d88"}}}}