{"action":"created","comment":{"url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/comments/41607344","id":41607344,"diff_hunk":"@@ -0,0 +1,16 @@\n+class CommitsLoadingJob < ActiveJob::Base\n+  queue_as :default\n+\n+  def perform(repo)\n+    github = Github.new do |config|\n+      config.oauth_token = \"#{ENV['GITHUB_OAUTH_TOKEN']}\"\n+      config.per_page = 100\n+      config.auto_pagination = true\n+    end\n+    repo.commits <<\n+      github.repos.commits.all(repo.owner, repo.name).map do |commit|\n+        Commit.create author: commit.author.try(:login), message: commit.commit.message,\n+                      sha: commit.sha, committed_at: commit.commit.author.date\n+      end","path":"app/jobs/commits_loading_job.rb","position":14,"original_position":14,"commit_id":"0d5e587520b580be1f0ff352c5793eb477e0a515","original_commit_id":"0d5e587520b580be1f0ff352c5793eb477e0a515","user":{"login":"Fodoj","id":78866,"avatar_url":"https://avatars.githubusercontent.com/u/78866?v=3","gravatar_id":"","url":"https://api.github.com/users/Fodoj","html_url":"https://github.com/Fodoj","followers_url":"https://api.github.com/users/Fodoj/followers","following_url":"https://api.github.com/users/Fodoj/following{/other_user}","gists_url":"https://api.github.com/users/Fodoj/gists{/gist_id}","starred_url":"https://api.github.com/users/Fodoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fodoj/subscriptions","organizations_url":"https://api.github.com/users/Fodoj/orgs","repos_url":"https://api.github.com/users/Fodoj/repos","events_url":"https://api.github.com/users/Fodoj/events{/privacy}","received_events_url":"https://api.github.com/users/Fodoj/received_events","type":"User","site_admin":false},"body":"отформатируй нормально этот блок кода, не читается же вообще","created_at":"2015-10-09T08:24:44Z","updated_at":"2015-10-09T08:24:44Z","html_url":"https://github.com/rkotov93/commits_holder/pull/1#discussion_r41607344","pull_request_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/comments/41607344"},"html":{"href":"https://github.com/rkotov93/commits_holder/pull/1#discussion_r41607344"},"pull_request":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1","id":47213486,"html_url":"https://github.com/rkotov93/commits_holder/pull/1","diff_url":"https://github.com/rkotov93/commits_holder/pull/1.diff","patch_url":"https://github.com/rkotov93/commits_holder/pull/1.patch","issue_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/1","number":1,"state":"open","locked":false,"title":"Add bacgkround commits loading","user":{"login":"rkotov93","id":640137,"avatar_url":"https://avatars.githubusercontent.com/u/640137?v=3","gravatar_id":"","url":"https://api.github.com/users/rkotov93","html_url":"https://github.com/rkotov93","followers_url":"https://api.github.com/users/rkotov93/followers","following_url":"https://api.github.com/users/rkotov93/following{/other_user}","gists_url":"https://api.github.com/users/rkotov93/gists{/gist_id}","starred_url":"https://api.github.com/users/rkotov93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkotov93/subscriptions","organizations_url":"https://api.github.com/users/rkotov93/orgs","repos_url":"https://api.github.com/users/rkotov93/repos","events_url":"https://api.github.com/users/rkotov93/events{/privacy}","received_events_url":"https://api.github.com/users/rkotov93/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-08T22:14:39Z","updated_at":"2015-10-09T08:24:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1e3637de0dc5c1ab1f2cc1f68bdce5850bd9cee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1/commits","review_comments_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1/comments","review_comment_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/1/comments","statuses_url":"https://api.github.com/repos/rkotov93/commits_holder/statuses/0d5e587520b580be1f0ff352c5793eb477e0a515","head":{"label":"rkotov93:delayed_commits_loading","ref":"delayed_commits_loading","sha":"0d5e587520b580be1f0ff352c5793eb477e0a515","user":{"login":"rkotov93","id":640137,"avatar_url":"https://avatars.githubusercontent.com/u/640137?v=3","gravatar_id":"","url":"https://api.github.com/users/rkotov93","html_url":"https://github.com/rkotov93","followers_url":"https://api.github.com/users/rkotov93/followers","following_url":"https://api.github.com/users/rkotov93/following{/other_user}","gists_url":"https://api.github.com/users/rkotov93/gists{/gist_id}","starred_url":"https://api.github.com/users/rkotov93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkotov93/subscriptions","organizations_url":"https://api.github.com/users/rkotov93/orgs","repos_url":"https://api.github.com/users/rkotov93/repos","events_url":"https://api.github.com/users/rkotov93/events{/privacy}","received_events_url":"https://api.github.com/users/rkotov93/received_events","type":"User","site_admin":false},"repo":{"id":43744515,"name":"commits_holder","full_name":"rkotov93/commits_holder","owner":{"login":"rkotov93","id":640137,"avatar_url":"https://avatars.githubusercontent.com/u/640137?v=3","gravatar_id":"","url":"https://api.github.com/users/rkotov93","html_url":"https://github.com/rkotov93","followers_url":"https://api.github.com/users/rkotov93/followers","following_url":"https://api.github.com/users/rkotov93/following{/other_user}","gists_url":"https://api.github.com/users/rkotov93/gists{/gist_id}","starred_url":"https://api.github.com/users/rkotov93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkotov93/subscriptions","organizations_url":"https://api.github.com/users/rkotov93/orgs","repos_url":"https://api.github.com/users/rkotov93/repos","events_url":"https://api.github.com/users/rkotov93/events{/privacy}","received_events_url":"https://api.github.com/users/rkotov93/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rkotov93/commits_holder","description":"Test task","fork":false,"url":"https://api.github.com/repos/rkotov93/commits_holder","forks_url":"https://api.github.com/repos/rkotov93/commits_holder/forks","keys_url":"https://api.github.com/repos/rkotov93/commits_holder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rkotov93/commits_holder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rkotov93/commits_holder/teams","hooks_url":"https://api.github.com/repos/rkotov93/commits_holder/hooks","issue_events_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/events{/number}","events_url":"https://api.github.com/repos/rkotov93/commits_holder/events","assignees_url":"https://api.github.com/repos/rkotov93/commits_holder/assignees{/user}","branches_url":"https://api.github.com/repos/rkotov93/commits_holder/branches{/branch}","tags_url":"https://api.github.com/repos/rkotov93/commits_holder/tags","blobs_url":"https://api.github.com/repos/rkotov93/commits_holder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rkotov93/commits_holder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rkotov93/commits_holder/git/refs{/sha}","trees_url":"https://api.github.com/repos/rkotov93/commits_holder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rkotov93/commits_holder/statuses/{sha}","languages_url":"https://api.github.com/repos/rkotov93/commits_holder/languages","stargazers_url":"https://api.github.com/repos/rkotov93/commits_holder/stargazers","contributors_url":"https://api.github.com/repos/rkotov93/commits_holder/contributors","subscribers_url":"https://api.github.com/repos/rkotov93/commits_holder/subscribers","subscription_url":"https://api.github.com/repos/rkotov93/commits_holder/subscription","commits_url":"https://api.github.com/repos/rkotov93/commits_holder/commits{/sha}","git_commits_url":"https://api.github.com/repos/rkotov93/commits_holder/git/commits{/sha}","comments_url":"https://api.github.com/repos/rkotov93/commits_holder/comments{/number}","issue_comment_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/comments{/number}","contents_url":"https://api.github.com/repos/rkotov93/commits_holder/contents/{+path}","compare_url":"https://api.github.com/repos/rkotov93/commits_holder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rkotov93/commits_holder/merges","archive_url":"https://api.github.com/repos/rkotov93/commits_holder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rkotov93/commits_holder/downloads","issues_url":"https://api.github.com/repos/rkotov93/commits_holder/issues{/number}","pulls_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls{/number}","milestones_url":"https://api.github.com/repos/rkotov93/commits_holder/milestones{/number}","notifications_url":"https://api.github.com/repos/rkotov93/commits_holder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rkotov93/commits_holder/labels{/name}","releases_url":"https://api.github.com/repos/rkotov93/commits_holder/releases{/id}","created_at":"2015-10-06T10:42:00Z","updated_at":"2015-10-06T10:42:56Z","pushed_at":"2015-10-08T22:18:04Z","git_url":"git://github.com/rkotov93/commits_holder.git","ssh_url":"git@github.com:rkotov93/commits_holder.git","clone_url":"https://github.com/rkotov93/commits_holder.git","svn_url":"https://github.com/rkotov93/commits_holder","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rkotov93:master","ref":"master","sha":"dcc9fb1b576aa3f1a3fc411c802afc361d996200","user":{"login":"rkotov93","id":640137,"avatar_url":"https://avatars.githubusercontent.com/u/640137?v=3","gravatar_id":"","url":"https://api.github.com/users/rkotov93","html_url":"https://github.com/rkotov93","followers_url":"https://api.github.com/users/rkotov93/followers","following_url":"https://api.github.com/users/rkotov93/following{/other_user}","gists_url":"https://api.github.com/users/rkotov93/gists{/gist_id}","starred_url":"https://api.github.com/users/rkotov93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkotov93/subscriptions","organizations_url":"https://api.github.com/users/rkotov93/orgs","repos_url":"https://api.github.com/users/rkotov93/repos","events_url":"https://api.github.com/users/rkotov93/events{/privacy}","received_events_url":"https://api.github.com/users/rkotov93/received_events","type":"User","site_admin":false},"repo":{"id":43744515,"name":"commits_holder","full_name":"rkotov93/commits_holder","owner":{"login":"rkotov93","id":640137,"avatar_url":"https://avatars.githubusercontent.com/u/640137?v=3","gravatar_id":"","url":"https://api.github.com/users/rkotov93","html_url":"https://github.com/rkotov93","followers_url":"https://api.github.com/users/rkotov93/followers","following_url":"https://api.github.com/users/rkotov93/following{/other_user}","gists_url":"https://api.github.com/users/rkotov93/gists{/gist_id}","starred_url":"https://api.github.com/users/rkotov93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkotov93/subscriptions","organizations_url":"https://api.github.com/users/rkotov93/orgs","repos_url":"https://api.github.com/users/rkotov93/repos","events_url":"https://api.github.com/users/rkotov93/events{/privacy}","received_events_url":"https://api.github.com/users/rkotov93/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rkotov93/commits_holder","description":"Test task","fork":false,"url":"https://api.github.com/repos/rkotov93/commits_holder","forks_url":"https://api.github.com/repos/rkotov93/commits_holder/forks","keys_url":"https://api.github.com/repos/rkotov93/commits_holder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rkotov93/commits_holder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rkotov93/commits_holder/teams","hooks_url":"https://api.github.com/repos/rkotov93/commits_holder/hooks","issue_events_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/events{/number}","events_url":"https://api.github.com/repos/rkotov93/commits_holder/events","assignees_url":"https://api.github.com/repos/rkotov93/commits_holder/assignees{/user}","branches_url":"https://api.github.com/repos/rkotov93/commits_holder/branches{/branch}","tags_url":"https://api.github.com/repos/rkotov93/commits_holder/tags","blobs_url":"https://api.github.com/repos/rkotov93/commits_holder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rkotov93/commits_holder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rkotov93/commits_holder/git/refs{/sha}","trees_url":"https://api.github.com/repos/rkotov93/commits_holder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rkotov93/commits_holder/statuses/{sha}","languages_url":"https://api.github.com/repos/rkotov93/commits_holder/languages","stargazers_url":"https://api.github.com/repos/rkotov93/commits_holder/stargazers","contributors_url":"https://api.github.com/repos/rkotov93/commits_holder/contributors","subscribers_url":"https://api.github.com/repos/rkotov93/commits_holder/subscribers","subscription_url":"https://api.github.com/repos/rkotov93/commits_holder/subscription","commits_url":"https://api.github.com/repos/rkotov93/commits_holder/commits{/sha}","git_commits_url":"https://api.github.com/repos/rkotov93/commits_holder/git/commits{/sha}","comments_url":"https://api.github.com/repos/rkotov93/commits_holder/comments{/number}","issue_comment_url":"https://api.github.com/repos/rkotov93/commits_holder/issues/comments{/number}","contents_url":"https://api.github.com/repos/rkotov93/commits_holder/contents/{+path}","compare_url":"https://api.github.com/repos/rkotov93/commits_holder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rkotov93/commits_holder/merges","archive_url":"https://api.github.com/repos/rkotov93/commits_holder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rkotov93/commits_holder/downloads","issues_url":"https://api.github.com/repos/rkotov93/commits_holder/issues{/number}","pulls_url":"https://api.github.com/repos/rkotov93/commits_holder/pulls{/number}","milestones_url":"https://api.github.com/repos/rkotov93/commits_holder/milestones{/number}","notifications_url":"https://api.github.com/repos/rkotov93/commits_holder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rkotov93/commits_holder/labels{/name}","releases_url":"https://api.github.com/repos/rkotov93/commits_holder/releases{/id}","created_at":"2015-10-06T10:42:00Z","updated_at":"2015-10-06T10:42:56Z","pushed_at":"2015-10-08T22:18:04Z","git_url":"git://github.com/rkotov93/commits_holder.git","ssh_url":"git@github.com:rkotov93/commits_holder.git","clone_url":"https://github.com/rkotov93/commits_holder.git","svn_url":"https://github.com/rkotov93/commits_holder","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1"},"html":{"href":"https://github.com/rkotov93/commits_holder/pull/1"},"issue":{"href":"https://api.github.com/repos/rkotov93/commits_holder/issues/1"},"comments":{"href":"https://api.github.com/repos/rkotov93/commits_holder/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rkotov93/commits_holder/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/rkotov93/commits_holder/statuses/0d5e587520b580be1f0ff352c5793eb477e0a515"}}}}