GitHub PullRequestReviewCommentEvent at 2014-08-19 18:43:51
Repository: WebsiteOne
Actor: YaroSpace
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/comments/16434646","id":16434646,"diff_hunk":"@@ -0,0 +1,19 @@\n+module GithubCommitsJob\n+  extend self\n+\n+  def run\n+    Project.with_github_url.each do |project|\n+      update_commit_counts_for(project)\n+    end\n+  end\n+\n+  private\n+\n+  def update_commit_counts_for(project)\n+    contributors = Octokit.contributor_stats(project.github_repo)\n+    contributors.map do |contributor|\n+      user = User.find_by_github_username(contributor.author.login)","path":"app/jobs/github_commits_job.rb","position":15,"original_position":15,"commit_id":"9321b6a0f6cc8b8e3b9ebc4c5a3fbf5506417088","original_commit_id":"9321b6a0f6cc8b8e3b9ebc4c5a3fbf5506417088","user":{"login":"YaroSpace","id":5670940,"avatar_url":"https://avatars.githubusercontent.com/u/5670940?v=2","gravatar_id":"70b1babe87aa249dc295cb16c2579733","url":"https://api.github.com/users/YaroSpace","html_url":"https://github.com/YaroSpace","followers_url":"https://api.github.com/users/YaroSpace/followers","following_url":"https://api.github.com/users/YaroSpace/following{/other_user}","gists_url":"https://api.github.com/users/YaroSpace/gists{/gist_id}","starred_url":"https://api.github.com/users/YaroSpace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaroSpace/subscriptions","organizations_url":"https://api.github.com/users/YaroSpace/orgs","repos_url":"https://api.github.com/users/YaroSpace/repos","events_url":"https://api.github.com/users/YaroSpace/events{/privacy}","received_events_url":"https://api.github.com/users/YaroSpace/received_events","type":"User","site_admin":false},"body":"what if user is not found?","created_at":"2014-08-19T18:43:51Z","updated_at":"2014-08-19T18:43:51Z","html_url":"https://github.com/AgileVentures/WebsiteOne/pull/507#discussion_r16434646","pull_request_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507","_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/comments/16434646"},"html":{"href":"https://github.com/AgileVentures/WebsiteOne/pull/507#discussion_r16434646"},"pull_request":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507"}}},"pull_request":{"url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507","id":19995468,"html_url":"https://github.com/AgileVentures/WebsiteOne/pull/507","diff_url":"https://github.com/AgileVentures/WebsiteOne/pull/507.diff","patch_url":"https://github.com/AgileVentures/WebsiteOne/pull/507.patch","issue_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/507","number":507,"state":"open","locked":false,"title":"Github Commit Count","user":{"login":"sampritipanda","id":1736001,"avatar_url":"https://avatars.githubusercontent.com/u/1736001?v=2","gravatar_id":"03d6176149e9fe81c83590dd4e7a5225","url":"https://api.github.com/users/sampritipanda","html_url":"https://github.com/sampritipanda","followers_url":"https://api.github.com/users/sampritipanda/followers","following_url":"https://api.github.com/users/sampritipanda/following{/other_user}","gists_url":"https://api.github.com/users/sampritipanda/gists{/gist_id}","starred_url":"https://api.github.com/users/sampritipanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampritipanda/subscriptions","organizations_url":"https://api.github.com/users/sampritipanda/orgs","repos_url":"https://api.github.com/users/sampritipanda/repos","events_url":"https://api.github.com/users/sampritipanda/events{/privacy}","received_events_url":"https://api.github.com/users/sampritipanda/received_events","type":"User","site_admin":false},"body":"https://www.pivotaltracker.com/story/show/64891298\r\n\r\n* Displays a user's contribution to different projects on profile page\r\n* Introduces a `GithubCommitsJob` which fetches contribution statistics from the Github API using the octokit gem through unauthenticated requests.\r\n* Introduces a rake task which provides a interface to run the `GithubCommitsJob` through `rake fetch_github_commits`.\r\n* The task is supposed to be run every 24 hours through the Heroku Scheduler.\r\n\r\n![gcc](https://cloud.githubusercontent.com/assets/1736001/3969985/de181a58-27c5-11e4-9b88-38aecbd46bb9.png)\r\n","created_at":"2014-08-19T17:26:02Z","updated_at":"2014-08-19T18:43:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69a8cbc26f11a42dc4727ae80ffbed1562bbfd76","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507/commits","review_comments_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507/comments","review_comment_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/507/comments","statuses_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/statuses/9321b6a0f6cc8b8e3b9ebc4c5a3fbf5506417088","head":{"label":"sampritipanda:github-commit-count","ref":"github-commit-count","sha":"9321b6a0f6cc8b8e3b9ebc4c5a3fbf5506417088","user":{"login":"sampritipanda","id":1736001,"avatar_url":"https://avatars.githubusercontent.com/u/1736001?v=2","gravatar_id":"03d6176149e9fe81c83590dd4e7a5225","url":"https://api.github.com/users/sampritipanda","html_url":"https://github.com/sampritipanda","followers_url":"https://api.github.com/users/sampritipanda/followers","following_url":"https://api.github.com/users/sampritipanda/following{/other_user}","gists_url":"https://api.github.com/users/sampritipanda/gists{/gist_id}","starred_url":"https://api.github.com/users/sampritipanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampritipanda/subscriptions","organizations_url":"https://api.github.com/users/sampritipanda/orgs","repos_url":"https://api.github.com/users/sampritipanda/repos","events_url":"https://api.github.com/users/sampritipanda/events{/privacy}","received_events_url":"https://api.github.com/users/sampritipanda/received_events","type":"User","site_admin":false},"repo":{"id":16829742,"name":"WebsiteOne","full_name":"sampritipanda/WebsiteOne","owner":{"login":"sampritipanda","id":1736001,"avatar_url":"https://avatars.githubusercontent.com/u/1736001?v=2","gravatar_id":"03d6176149e9fe81c83590dd4e7a5225","url":"https://api.github.com/users/sampritipanda","html_url":"https://github.com/sampritipanda","followers_url":"https://api.github.com/users/sampritipanda/followers","following_url":"https://api.github.com/users/sampritipanda/following{/other_user}","gists_url":"https://api.github.com/users/sampritipanda/gists{/gist_id}","starred_url":"https://api.github.com/users/sampritipanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampritipanda/subscriptions","organizations_url":"https://api.github.com/users/sampritipanda/orgs","repos_url":"https://api.github.com/users/sampritipanda/repos","events_url":"https://api.github.com/users/sampritipanda/events{/privacy}","received_events_url":"https://api.github.com/users/sampritipanda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sampritipanda/WebsiteOne","description":"A website for Agile Ventures","fork":true,"url":"https://api.github.com/repos/sampritipanda/WebsiteOne","forks_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/forks","keys_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/teams","hooks_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/hooks","issue_events_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/issues/events{/number}","events_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/events","assignees_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/assignees{/user}","branches_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/branches{/branch}","tags_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/tags","blobs_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/git/refs{/sha}","trees_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/statuses/{sha}","languages_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/languages","stargazers_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/stargazers","contributors_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/contributors","subscribers_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/subscribers","subscription_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/subscription","commits_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/commits{/sha}","git_commits_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/git/commits{/sha}","comments_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/comments{/number}","issue_comment_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/issues/comments/{number}","contents_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/contents/{+path}","compare_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/merges","archive_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/downloads","issues_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/issues{/number}","pulls_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/pulls{/number}","milestones_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/milestones{/number}","notifications_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/labels{/name}","releases_url":"https://api.github.com/repos/sampritipanda/WebsiteOne/releases{/id}","created_at":"2014-02-14T07:01:24Z","updated_at":"2014-06-29T10:42:25Z","pushed_at":"2014-08-19T17:34:10Z","git_url":"git://github.com/sampritipanda/WebsiteOne.git","ssh_url":"git@github.com:sampritipanda/WebsiteOne.git","clone_url":"https://github.com/sampritipanda/WebsiteOne.git","svn_url":"https://github.com/sampritipanda/WebsiteOne","homepage":null,"size":34170,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"AgileVentures:develop","ref":"develop","sha":"a2e8723c497a7447efac1327c52d3ee46ad65bbe","user":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=2","gravatar_id":"cb33b32bd5d675db7be148542976e510","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"repo":{"id":15742370,"name":"WebsiteOne","full_name":"AgileVentures/WebsiteOne","owner":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=2","gravatar_id":"cb33b32bd5d675db7be148542976e510","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AgileVentures/WebsiteOne","description":"A website for Agile Ventures","fork":false,"url":"https://api.github.com/repos/AgileVentures/WebsiteOne","forks_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/forks","keys_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/teams","hooks_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/hooks","issue_events_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/events{/number}","events_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/events","assignees_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/assignees{/user}","branches_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/branches{/branch}","tags_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/tags","blobs_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/statuses/{sha}","languages_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/languages","stargazers_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/stargazers","contributors_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/contributors","subscribers_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/subscribers","subscription_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/subscription","commits_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/comments/{number}","contents_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/contents/{+path}","compare_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/merges","archive_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/downloads","issues_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues{/number}","pulls_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls{/number}","milestones_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/milestones{/number}","notifications_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/labels{/name}","releases_url":"https://api.github.com/repos/AgileVentures/WebsiteOne/releases{/id}","created_at":"2014-01-08T17:20:22Z","updated_at":"2014-07-20T10:35:25Z","pushed_at":"2014-08-19T07:51:51Z","git_url":"git://github.com/AgileVentures/WebsiteOne.git","ssh_url":"git@github.com:AgileVentures/WebsiteOne.git","clone_url":"https://github.com/AgileVentures/WebsiteOne.git","svn_url":"https://github.com/AgileVentures/WebsiteOne","homepage":null,"size":39835,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":61,"mirror_url":null,"open_issues_count":8,"forks":61,"open_issues":8,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507"},"html":{"href":"https://github.com/AgileVentures/WebsiteOne/pull/507"},"issue":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/507"},"comments":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/issues/507/comments"},"review_comments":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507/comments"},"review_comment":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/pulls/507/commits"},"statuses":{"href":"https://api.github.com/repos/AgileVentures/WebsiteOne/statuses/9321b6a0f6cc8b8e3b9ebc4c5a3fbf5506417088"}}}}