{"action":"created","comment":{"url":"https://api.github.com/repos/gengo/goship/pulls/comments/51967419","id":51967419,"diff_hunk":"@@ -176,18 +232,18 @@\n         (function(project) {\n           var url = diffs[project];\n           // hashes: currentCommit...latestCommit\n-          var hashes = (url.substr(url.lastIndexOf('/') + 1)).split('...');\n-          var proj_name = url.match(config.github.url_compare_regexp)[1];\n-\n-          getGithubPivotalIDs(GITHUB_TOKEN, proj_name, hashes[0], hashes[1], function(commits) {\n-            var messages = [];\n-            for (commit in commits) {\n-              messages.push(commits[commit]['commit']['message']); // get all github commit messages\n-            }\n+          var commitHashes = (url.substr(url.lastIndexOf('/') + 1)).split('...');\n+          var repositoryName = url.match(config.github.url_compare_regexp)[1];\n \n-            var pivotal_ids = getCommitIDs(messages); // extract pivotal ticket IDs\n+          getGithubCommits(GITHUB_TOKEN, repositoryName, commitHashes[0], commitHashes[1], function(commits) {","path":"static/js/pivotal.js","position":292,"original_position":292,"commit_id":"6cf5d8f517e0cf9062dd1466742fa6366f1da6db","original_commit_id":"eb8926ad18bb477703b3f3d33f2272f48f2dc5db","user":{"login":"marexandre","id":228359,"avatar_url":"https://avatars.githubusercontent.com/u/228359?v=3","gravatar_id":"","url":"https://api.github.com/users/marexandre","html_url":"https://github.com/marexandre","followers_url":"https://api.github.com/users/marexandre/followers","following_url":"https://api.github.com/users/marexandre/following{/other_user}","gists_url":"https://api.github.com/users/marexandre/gists{/gist_id}","starred_url":"https://api.github.com/users/marexandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marexandre/subscriptions","organizations_url":"https://api.github.com/users/marexandre/orgs","repos_url":"https://api.github.com/users/marexandre/repos","events_url":"https://api.github.com/users/marexandre/events{/privacy}","received_events_url":"https://api.github.com/users/marexandre/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2016-02-05T01:49:17Z","updated_at":"2016-02-05T01:49:17Z","html_url":"https://github.com/gengo/goship/pull/182#discussion_r51967419","pull_request_url":"https://api.github.com/repos/gengo/goship/pulls/182","_links":{"self":{"href":"https://api.github.com/repos/gengo/goship/pulls/comments/51967419"},"html":{"href":"https://github.com/gengo/goship/pull/182#discussion_r51967419"},"pull_request":{"href":"https://api.github.com/repos/gengo/goship/pulls/182"}}},"pull_request":{"url":"https://api.github.com/repos/gengo/goship/pulls/182","id":58254045,"html_url":"https://github.com/gengo/goship/pull/182","diff_url":"https://github.com/gengo/goship/pull/182.diff","patch_url":"https://github.com/gengo/goship/pull/182.patch","issue_url":"https://api.github.com/repos/gengo/goship/issues/182","number":182,"state":"open","locked":false,"title":"Show story dependencies count and a list of GitHub repositories","user":{"login":"marexandre","id":228359,"avatar_url":"https://avatars.githubusercontent.com/u/228359?v=3","gravatar_id":"","url":"https://api.github.com/users/marexandre","html_url":"https://github.com/marexandre","followers_url":"https://api.github.com/users/marexandre/followers","following_url":"https://api.github.com/users/marexandre/following{/other_user}","gists_url":"https://api.github.com/users/marexandre/gists{/gist_id}","starred_url":"https://api.github.com/users/marexandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marexandre/subscriptions","organizations_url":"https://api.github.com/users/marexandre/orgs","repos_url":"https://api.github.com/users/marexandre/repos","events_url":"https://api.github.com/users/marexandre/events{/privacy}","received_events_url":"https://api.github.com/users/marexandre/received_events","type":"User","site_admin":false},"body":"![screen shot 2016-02-04 at 5 16 17 pm](https://cloud.githubusercontent.com/assets/228359/12809506/17d24c18-cb63-11e5-93df-bf569e6dc02b.png)\r\n\r\nIt was very hard to identify before deploying if there are any other repository dependencies. In this PR I check pivotal story activity to check if there are any GitHub activity like commits and grab repository names from there. So, if the developer doesn't properly add pivotal story ID to his commits then this functionality won't work.\r\n\r\nAlso some code refactoring.","created_at":"2016-02-04T08:22:23Z","updated_at":"2016-02-05T01:49:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba9e01f3eb4d51e2969ca26858cf8a11d716cf34","assignee":{"login":"seikoudoku2000","id":749198,"avatar_url":"https://avatars.githubusercontent.com/u/749198?v=3","gravatar_id":"","url":"https://api.github.com/users/seikoudoku2000","html_url":"https://github.com/seikoudoku2000","followers_url":"https://api.github.com/users/seikoudoku2000/followers","following_url":"https://api.github.com/users/seikoudoku2000/following{/other_user}","gists_url":"https://api.github.com/users/seikoudoku2000/gists{/gist_id}","starred_url":"https://api.github.com/users/seikoudoku2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seikoudoku2000/subscriptions","organizations_url":"https://api.github.com/users/seikoudoku2000/orgs","repos_url":"https://api.github.com/users/seikoudoku2000/repos","events_url":"https://api.github.com/users/seikoudoku2000/events{/privacy}","received_events_url":"https://api.github.com/users/seikoudoku2000/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gengo/goship/pulls/182/commits","review_comments_url":"https://api.github.com/repos/gengo/goship/pulls/182/comments","review_comment_url":"https://api.github.com/repos/gengo/goship/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gengo/goship/issues/182/comments","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/6cf5d8f517e0cf9062dd1466742fa6366f1da6db","head":{"label":"gengo:show-dependency-count-for-projects","ref":"show-dependency-count-for-projects","sha":"6cf5d8f517e0cf9062dd1466742fa6366f1da6db","user":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"repo":{"id":12479555,"name":"goship","full_name":"gengo/goship","owner":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gengo/goship","description":"A simple tool for deploying code to servers.","fork":false,"url":"https://api.github.com/repos/gengo/goship","forks_url":"https://api.github.com/repos/gengo/goship/forks","keys_url":"https://api.github.com/repos/gengo/goship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gengo/goship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gengo/goship/teams","hooks_url":"https://api.github.com/repos/gengo/goship/hooks","issue_events_url":"https://api.github.com/repos/gengo/goship/issues/events{/number}","events_url":"https://api.github.com/repos/gengo/goship/events","assignees_url":"https://api.github.com/repos/gengo/goship/assignees{/user}","branches_url":"https://api.github.com/repos/gengo/goship/branches{/branch}","tags_url":"https://api.github.com/repos/gengo/goship/tags","blobs_url":"https://api.github.com/repos/gengo/goship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gengo/goship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gengo/goship/git/refs{/sha}","trees_url":"https://api.github.com/repos/gengo/goship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/{sha}","languages_url":"https://api.github.com/repos/gengo/goship/languages","stargazers_url":"https://api.github.com/repos/gengo/goship/stargazers","contributors_url":"https://api.github.com/repos/gengo/goship/contributors","subscribers_url":"https://api.github.com/repos/gengo/goship/subscribers","subscription_url":"https://api.github.com/repos/gengo/goship/subscription","commits_url":"https://api.github.com/repos/gengo/goship/commits{/sha}","git_commits_url":"https://api.github.com/repos/gengo/goship/git/commits{/sha}","comments_url":"https://api.github.com/repos/gengo/goship/comments{/number}","issue_comment_url":"https://api.github.com/repos/gengo/goship/issues/comments{/number}","contents_url":"https://api.github.com/repos/gengo/goship/contents/{+path}","compare_url":"https://api.github.com/repos/gengo/goship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gengo/goship/merges","archive_url":"https://api.github.com/repos/gengo/goship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gengo/goship/downloads","issues_url":"https://api.github.com/repos/gengo/goship/issues{/number}","pulls_url":"https://api.github.com/repos/gengo/goship/pulls{/number}","milestones_url":"https://api.github.com/repos/gengo/goship/milestones{/number}","notifications_url":"https://api.github.com/repos/gengo/goship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gengo/goship/labels{/name}","releases_url":"https://api.github.com/repos/gengo/goship/releases{/id}","deployments_url":"https://api.github.com/repos/gengo/goship/deployments","created_at":"2013-08-30T06:20:15Z","updated_at":"2016-02-02T09:27:02Z","pushed_at":"2016-02-05T01:47:13Z","git_url":"git://github.com/gengo/goship.git","ssh_url":"git@github.com:gengo/goship.git","clone_url":"https://github.com/gengo/goship.git","svn_url":"https://github.com/gengo/goship","homepage":"","size":2589,"stargazers_count":432,"watchers_count":432,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":8,"forks":26,"open_issues":8,"watchers":432,"default_branch":"master"}},"base":{"label":"gengo:master","ref":"master","sha":"c70080ae3ae2411b7caae181b7d4e04533f2f583","user":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"repo":{"id":12479555,"name":"goship","full_name":"gengo/goship","owner":{"login":"gengo","id":1681251,"avatar_url":"https://avatars.githubusercontent.com/u/1681251?v=3","gravatar_id":"","url":"https://api.github.com/users/gengo","html_url":"https://github.com/gengo","followers_url":"https://api.github.com/users/gengo/followers","following_url":"https://api.github.com/users/gengo/following{/other_user}","gists_url":"https://api.github.com/users/gengo/gists{/gist_id}","starred_url":"https://api.github.com/users/gengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gengo/subscriptions","organizations_url":"https://api.github.com/users/gengo/orgs","repos_url":"https://api.github.com/users/gengo/repos","events_url":"https://api.github.com/users/gengo/events{/privacy}","received_events_url":"https://api.github.com/users/gengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gengo/goship","description":"A simple tool for deploying code to servers.","fork":false,"url":"https://api.github.com/repos/gengo/goship","forks_url":"https://api.github.com/repos/gengo/goship/forks","keys_url":"https://api.github.com/repos/gengo/goship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gengo/goship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gengo/goship/teams","hooks_url":"https://api.github.com/repos/gengo/goship/hooks","issue_events_url":"https://api.github.com/repos/gengo/goship/issues/events{/number}","events_url":"https://api.github.com/repos/gengo/goship/events","assignees_url":"https://api.github.com/repos/gengo/goship/assignees{/user}","branches_url":"https://api.github.com/repos/gengo/goship/branches{/branch}","tags_url":"https://api.github.com/repos/gengo/goship/tags","blobs_url":"https://api.github.com/repos/gengo/goship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gengo/goship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gengo/goship/git/refs{/sha}","trees_url":"https://api.github.com/repos/gengo/goship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gengo/goship/statuses/{sha}","languages_url":"https://api.github.com/repos/gengo/goship/languages","stargazers_url":"https://api.github.com/repos/gengo/goship/stargazers","contributors_url":"https://api.github.com/repos/gengo/goship/contributors","subscribers_url":"https://api.github.com/repos/gengo/goship/subscribers","subscription_url":"https://api.github.com/repos/gengo/goship/subscription","commits_url":"https://api.github.com/repos/gengo/goship/commits{/sha}","git_commits_url":"https://api.github.com/repos/gengo/goship/git/commits{/sha}","comments_url":"https://api.github.com/repos/gengo/goship/comments{/number}","issue_comment_url":"https://api.github.com/repos/gengo/goship/issues/comments{/number}","contents_url":"https://api.github.com/repos/gengo/goship/contents/{+path}","compare_url":"https://api.github.com/repos/gengo/goship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gengo/goship/merges","archive_url":"https://api.github.com/repos/gengo/goship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gengo/goship/downloads","issues_url":"https://api.github.com/repos/gengo/goship/issues{/number}","pulls_url":"https://api.github.com/repos/gengo/goship/pulls{/number}","milestones_url":"https://api.github.com/repos/gengo/goship/milestones{/number}","notifications_url":"https://api.github.com/repos/gengo/goship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gengo/goship/labels{/name}","releases_url":"https://api.github.com/repos/gengo/goship/releases{/id}","deployments_url":"https://api.github.com/repos/gengo/goship/deployments","created_at":"2013-08-30T06:20:15Z","updated_at":"2016-02-02T09:27:02Z","pushed_at":"2016-02-05T01:47:13Z","git_url":"git://github.com/gengo/goship.git","ssh_url":"git@github.com:gengo/goship.git","clone_url":"https://github.com/gengo/goship.git","svn_url":"https://github.com/gengo/goship","homepage":"","size":2589,"stargazers_count":432,"watchers_count":432,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":8,"forks":26,"open_issues":8,"watchers":432,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gengo/goship/pulls/182"},"html":{"href":"https://github.com/gengo/goship/pull/182"},"issue":{"href":"https://api.github.com/repos/gengo/goship/issues/182"},"comments":{"href":"https://api.github.com/repos/gengo/goship/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/gengo/goship/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/gengo/goship/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gengo/goship/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/gengo/goship/statuses/6cf5d8f517e0cf9062dd1466742fa6366f1da6db"}}}}