{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/comments/92335383","pull_request_review_id":12847823,"id":92335383,"diff_hunk":"@@ -0,0 +1,123 @@\n+'use strict';\n+\n+var fs = require('fs');\n+var https = require('https');\n+\n+var GITHUB_API_HOST = 'api.github.com';\n+var PATH_TO_REPO = '/urfu-2016/';\n+var PATH_TO_TOKEN = 'token.txt';\n+var USER_AGENT = 'My-Awesome-github-api';\n+\n+var TOKEN;\n+try {\n+    TOKEN = fs.readFileSync(PATH_TO_TOKEN);\n+} catch (e) {\n+    TOKEN = '';\n+}\n+\n+function buildOptions(apiMethod, apiParam) {\n+    return {\n+        protocol: 'https:',\n+        host: GITHUB_API_HOST,\n+        path: '/' + apiMethod + PATH_TO_REPO + apiParam + (TOKEN ? ('?access_token=' + TOKEN) : ''),\n+        headers: { 'User-Agent': USER_AGENT }\n+    };\n+}\n+\n+function getSubscriberToReadData(callback) {\n+    return function (request) {\n+        var data = '';\n+\n+        request.on('error', callback);\n+\n+        request.on('data', function (chunk) {\n+            data += chunk;\n+        });\n+\n+        request.on('end', function () {\n+            callback(null, data);\n+        });\n+    };\n+}\n+\n+function makeJsonCallback(callback) {\n+    return function (error, result) {\n+        if (error) {\n+            callback(error);\n+        } else {\n+            try {\n+                callback(null, JSON.parse(result));\n+            } catch (e) {\n+                callback(e);\n+            }\n+        }\n+    };\n+}\n+\n+function makeHttpRequest(apiMethod, apiParam, callback) {\n+    var request = https.request(buildOptions(apiMethod, apiParam),\n+        getSubscriberToReadData(callback));\n+    request.end();\n+}\n+\n+exports.getRepoInfo = function (repo, callback) {\n+    makeHttpRequest('repos', repo, makeJsonCallback(callback));\n+    // var request = https.request(buildOptions('repos', repo),","path":"githubApi.js","position":65,"original_position":65,"commit_id":"329fc08742ae614f81c3d8598ca61ffc6ecb1b8e","original_commit_id":"329fc08742ae614f81c3d8598ca61ffc6ecb1b8e","user":{"login":"steppefox","id":4667275,"avatar_url":"https://avatars.githubusercontent.com/u/4667275?v=3","gravatar_id":"","url":"https://api.github.com/users/steppefox","html_url":"https://github.com/steppefox","followers_url":"https://api.github.com/users/steppefox/followers","following_url":"https://api.github.com/users/steppefox/following{/other_user}","gists_url":"https://api.github.com/users/steppefox/gists{/gist_id}","starred_url":"https://api.github.com/users/steppefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steppefox/subscriptions","organizations_url":"https://api.github.com/users/steppefox/orgs","repos_url":"https://api.github.com/users/steppefox/repos","events_url":"https://api.github.com/users/steppefox/events{/privacy}","received_events_url":"https://api.github.com/users/steppefox/received_events","type":"User","site_admin":false},"body":"Комментарии для истории остались? oO Надо вычищать","created_at":"2016-12-14T07:34:49Z","updated_at":"2016-12-14T07:41:21Z","html_url":"https://github.com/urfu-2016/javascript-task-9/pull/6#discussion_r92335383","pull_request_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/comments/92335383"},"html":{"href":"https://github.com/urfu-2016/javascript-task-9/pull/6#discussion_r92335383"},"pull_request":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6","id":96791024,"html_url":"https://github.com/urfu-2016/javascript-task-9/pull/6","diff_url":"https://github.com/urfu-2016/javascript-task-9/pull/6.diff","patch_url":"https://github.com/urfu-2016/javascript-task-9/pull/6.patch","issue_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/6","number":6,"state":"open","locked":false,"title":"Загнойко Александр","user":{"login":"FoKycHuK","id":6791344,"avatar_url":"https://avatars.githubusercontent.com/u/6791344?v=3","gravatar_id":"","url":"https://api.github.com/users/FoKycHuK","html_url":"https://github.com/FoKycHuK","followers_url":"https://api.github.com/users/FoKycHuK/followers","following_url":"https://api.github.com/users/FoKycHuK/following{/other_user}","gists_url":"https://api.github.com/users/FoKycHuK/gists{/gist_id}","starred_url":"https://api.github.com/users/FoKycHuK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoKycHuK/subscriptions","organizations_url":"https://api.github.com/users/FoKycHuK/orgs","repos_url":"https://api.github.com/users/FoKycHuK/repos","events_url":"https://api.github.com/users/FoKycHuK/events{/privacy}","received_events_url":"https://api.github.com/users/FoKycHuK/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-06T19:38:08Z","updated_at":"2016-12-14T07:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56e13cda51117e769562b2fb13862241c6de2849","assignee":{"login":"steppefox","id":4667275,"avatar_url":"https://avatars.githubusercontent.com/u/4667275?v=3","gravatar_id":"","url":"https://api.github.com/users/steppefox","html_url":"https://github.com/steppefox","followers_url":"https://api.github.com/users/steppefox/followers","following_url":"https://api.github.com/users/steppefox/following{/other_user}","gists_url":"https://api.github.com/users/steppefox/gists{/gist_id}","starred_url":"https://api.github.com/users/steppefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steppefox/subscriptions","organizations_url":"https://api.github.com/users/steppefox/orgs","repos_url":"https://api.github.com/users/steppefox/repos","events_url":"https://api.github.com/users/steppefox/events{/privacy}","received_events_url":"https://api.github.com/users/steppefox/received_events","type":"User","site_admin":false},"assignees":[{"login":"steppefox","id":4667275,"avatar_url":"https://avatars.githubusercontent.com/u/4667275?v=3","gravatar_id":"","url":"https://api.github.com/users/steppefox","html_url":"https://github.com/steppefox","followers_url":"https://api.github.com/users/steppefox/followers","following_url":"https://api.github.com/users/steppefox/following{/other_user}","gists_url":"https://api.github.com/users/steppefox/gists{/gist_id}","starred_url":"https://api.github.com/users/steppefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steppefox/subscriptions","organizations_url":"https://api.github.com/users/steppefox/orgs","repos_url":"https://api.github.com/users/steppefox/repos","events_url":"https://api.github.com/users/steppefox/events{/privacy}","received_events_url":"https://api.github.com/users/steppefox/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6/commits","review_comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6/comments","review_comment_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/6/comments","statuses_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/statuses/329fc08742ae614f81c3d8598ca61ffc6ecb1b8e","head":{"label":"FoKycHuK:master","ref":"master","sha":"329fc08742ae614f81c3d8598ca61ffc6ecb1b8e","user":{"login":"FoKycHuK","id":6791344,"avatar_url":"https://avatars.githubusercontent.com/u/6791344?v=3","gravatar_id":"","url":"https://api.github.com/users/FoKycHuK","html_url":"https://github.com/FoKycHuK","followers_url":"https://api.github.com/users/FoKycHuK/followers","following_url":"https://api.github.com/users/FoKycHuK/following{/other_user}","gists_url":"https://api.github.com/users/FoKycHuK/gists{/gist_id}","starred_url":"https://api.github.com/users/FoKycHuK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoKycHuK/subscriptions","organizations_url":"https://api.github.com/users/FoKycHuK/orgs","repos_url":"https://api.github.com/users/FoKycHuK/repos","events_url":"https://api.github.com/users/FoKycHuK/events{/privacy}","received_events_url":"https://api.github.com/users/FoKycHuK/received_events","type":"User","site_admin":false},"repo":{"id":75645902,"name":"javascript-task-9","full_name":"FoKycHuK/javascript-task-9","owner":{"login":"FoKycHuK","id":6791344,"avatar_url":"https://avatars.githubusercontent.com/u/6791344?v=3","gravatar_id":"","url":"https://api.github.com/users/FoKycHuK","html_url":"https://github.com/FoKycHuK","followers_url":"https://api.github.com/users/FoKycHuK/followers","following_url":"https://api.github.com/users/FoKycHuK/following{/other_user}","gists_url":"https://api.github.com/users/FoKycHuK/gists{/gist_id}","starred_url":"https://api.github.com/users/FoKycHuK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoKycHuK/subscriptions","organizations_url":"https://api.github.com/users/FoKycHuK/orgs","repos_url":"https://api.github.com/users/FoKycHuK/repos","events_url":"https://api.github.com/users/FoKycHuK/events{/privacy}","received_events_url":"https://api.github.com/users/FoKycHuK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FoKycHuK/javascript-task-9","description":"Задача «Просмотрщик задач»","fork":true,"url":"https://api.github.com/repos/FoKycHuK/javascript-task-9","forks_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/forks","keys_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/teams","hooks_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/hooks","issue_events_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/issues/events{/number}","events_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/events","assignees_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/assignees{/user}","branches_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/branches{/branch}","tags_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/tags","blobs_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/statuses/{sha}","languages_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/languages","stargazers_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/stargazers","contributors_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/contributors","subscribers_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/subscribers","subscription_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/subscription","commits_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/contents/{+path}","compare_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/merges","archive_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/downloads","issues_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/issues{/number}","pulls_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/pulls{/number}","milestones_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/milestones{/number}","notifications_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/labels{/name}","releases_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/releases{/id}","deployments_url":"https://api.github.com/repos/FoKycHuK/javascript-task-9/deployments","created_at":"2016-12-05T16:44:23Z","updated_at":"2016-12-05T16:44:24Z","pushed_at":"2016-12-13T20:12:08Z","git_url":"git://github.com/FoKycHuK/javascript-task-9.git","ssh_url":"git@github.com:FoKycHuK/javascript-task-9.git","clone_url":"https://github.com/FoKycHuK/javascript-task-9.git","svn_url":"https://github.com/FoKycHuK/javascript-task-9","homepage":"","size":23,"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":"urfu-2016:master","ref":"master","sha":"68830ab536015e7a5c3af5d76ea1c0acb06bc2c9","user":{"login":"urfu-2016","id":22170529,"avatar_url":"https://avatars.githubusercontent.com/u/22170529?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2016","html_url":"https://github.com/urfu-2016","followers_url":"https://api.github.com/users/urfu-2016/followers","following_url":"https://api.github.com/users/urfu-2016/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2016/subscriptions","organizations_url":"https://api.github.com/users/urfu-2016/orgs","repos_url":"https://api.github.com/users/urfu-2016/repos","events_url":"https://api.github.com/users/urfu-2016/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2016/received_events","type":"Organization","site_admin":false},"repo":{"id":75366997,"name":"javascript-task-9","full_name":"urfu-2016/javascript-task-9","owner":{"login":"urfu-2016","id":22170529,"avatar_url":"https://avatars.githubusercontent.com/u/22170529?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2016","html_url":"https://github.com/urfu-2016","followers_url":"https://api.github.com/users/urfu-2016/followers","following_url":"https://api.github.com/users/urfu-2016/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2016/subscriptions","organizations_url":"https://api.github.com/users/urfu-2016/orgs","repos_url":"https://api.github.com/users/urfu-2016/repos","events_url":"https://api.github.com/users/urfu-2016/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2016/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urfu-2016/javascript-task-9","description":"Задача «Просмотрщик задач»","fork":false,"url":"https://api.github.com/repos/urfu-2016/javascript-task-9","forks_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/forks","keys_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/teams","hooks_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/hooks","issue_events_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/events","assignees_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/tags","blobs_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/languages","stargazers_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/stargazers","contributors_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/contributors","subscribers_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/subscribers","subscription_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/subscription","commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/merges","archive_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/downloads","issues_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2016/javascript-task-9/deployments","created_at":"2016-12-02T06:20:30Z","updated_at":"2016-12-05T06:32:59Z","pushed_at":"2016-12-13T20:12:08Z","git_url":"git://github.com/urfu-2016/javascript-task-9.git","ssh_url":"git@github.com:urfu-2016/javascript-task-9.git","clone_url":"https://github.com/urfu-2016/javascript-task-9.git","svn_url":"https://github.com/urfu-2016/javascript-task-9","homepage":"","size":48,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":11,"forks":25,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6"},"html":{"href":"https://github.com/urfu-2016/javascript-task-9/pull/6"},"issue":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/6"},"comments":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2016/javascript-task-9/statuses/329fc08742ae614f81c3d8598ca61ffc6ecb1b8e"}}}}
{"actor":{"display_login":"steppefox"}}