{"action":"created","comment":{"url":"https://api.github.com/repos/koajs/koa/pulls/comments/45361950","id":45361950,"diff_hunk":"@@ -50,22 +74,24 @@ const proto = module.exports = {\n       res: '<original node res>',\n       socket: '<original node socket>'\n     };\n-  },\n+  }\n \n   /**\n    * Similar to .throw(), adds assertion.\n    *\n-   *    this.assert(this.user, 401, 'Please login!');\n+   *    ctx.assert(ctx.user, 401, 'Please login!');\n    *\n    * See: https://github.com/jshttp/http-assert\n    *\n-   * @param {Mixed} test\n+   * @param {Mixed} value\n    * @param {Number} status\n    * @param {String} message\n+   * @param {Mixed} opts\n    * @api public\n    */\n-\n-  assert: httpAssert,\n+  assert(value, status, msg, opts) {","path":"lib/context.js","position":76,"original_position":76,"commit_id":"33467bf49d00a145ba5172d99d3ed9718ff4e108","original_commit_id":"33467bf49d00a145ba5172d99d3ed9718ff4e108","user":{"login":"tejasmanohar","id":5959235,"avatar_url":"https://avatars.githubusercontent.com/u/5959235?v=3","gravatar_id":"","url":"https://api.github.com/users/tejasmanohar","html_url":"https://github.com/tejasmanohar","followers_url":"https://api.github.com/users/tejasmanohar/followers","following_url":"https://api.github.com/users/tejasmanohar/following{/other_user}","gists_url":"https://api.github.com/users/tejasmanohar/gists{/gist_id}","starred_url":"https://api.github.com/users/tejasmanohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejasmanohar/subscriptions","organizations_url":"https://api.github.com/users/tejasmanohar/orgs","repos_url":"https://api.github.com/users/tejasmanohar/repos","events_url":"https://api.github.com/users/tejasmanohar/events{/privacy}","received_events_url":"https://api.github.com/users/tejasmanohar/received_events","type":"User","site_admin":false},"body":"ooh true, forgot destructuring wasn't stable in node- too used to babel haha","created_at":"2015-11-19T16:19:12Z","updated_at":"2015-11-19T16:19:12Z","html_url":"https://github.com/koajs/koa/pull/597#discussion_r45361950","pull_request_url":"https://api.github.com/repos/koajs/koa/pulls/597","_links":{"self":{"href":"https://api.github.com/repos/koajs/koa/pulls/comments/45361950"},"html":{"href":"https://github.com/koajs/koa/pull/597#discussion_r45361950"},"pull_request":{"href":"https://api.github.com/repos/koajs/koa/pulls/597"}}},"pull_request":{"url":"https://api.github.com/repos/koajs/koa/pulls/597","id":51141662,"html_url":"https://github.com/koajs/koa/pull/597","diff_url":"https://github.com/koajs/koa/pull/597.diff","patch_url":"https://github.com/koajs/koa/pull/597.patch","issue_url":"https://api.github.com/repos/koajs/koa/issues/597","number":597,"state":"open","locked":false,"title":"Use ES6 classes","user":{"login":"simplyianm","id":401263,"avatar_url":"https://avatars.githubusercontent.com/u/401263?v=3","gravatar_id":"","url":"https://api.github.com/users/simplyianm","html_url":"https://github.com/simplyianm","followers_url":"https://api.github.com/users/simplyianm/followers","following_url":"https://api.github.com/users/simplyianm/following{/other_user}","gists_url":"https://api.github.com/users/simplyianm/gists{/gist_id}","starred_url":"https://api.github.com/users/simplyianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplyianm/subscriptions","organizations_url":"https://api.github.com/users/simplyianm/orgs","repos_url":"https://api.github.com/users/simplyianm/repos","events_url":"https://api.github.com/users/simplyianm/events{/privacy}","received_events_url":"https://api.github.com/users/simplyianm/received_events","type":"User","site_admin":false},"body":"This converts `Context`, `Request`, and `Response` to ES6 classes to make things more semantic.","created_at":"2015-11-18T21:02:43Z","updated_at":"2015-11-19T16:19:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70408a1435b6de1464b773da86be4aa0aaaa9c42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/koajs/koa/pulls/597/commits","review_comments_url":"https://api.github.com/repos/koajs/koa/pulls/597/comments","review_comment_url":"https://api.github.com/repos/koajs/koa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koajs/koa/issues/597/comments","statuses_url":"https://api.github.com/repos/koajs/koa/statuses/33467bf49d00a145ba5172d99d3ed9718ff4e108","head":{"label":"simplyianm:request_response_classes","ref":"request_response_classes","sha":"33467bf49d00a145ba5172d99d3ed9718ff4e108","user":{"login":"simplyianm","id":401263,"avatar_url":"https://avatars.githubusercontent.com/u/401263?v=3","gravatar_id":"","url":"https://api.github.com/users/simplyianm","html_url":"https://github.com/simplyianm","followers_url":"https://api.github.com/users/simplyianm/followers","following_url":"https://api.github.com/users/simplyianm/following{/other_user}","gists_url":"https://api.github.com/users/simplyianm/gists{/gist_id}","starred_url":"https://api.github.com/users/simplyianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplyianm/subscriptions","organizations_url":"https://api.github.com/users/simplyianm/orgs","repos_url":"https://api.github.com/users/simplyianm/repos","events_url":"https://api.github.com/users/simplyianm/events{/privacy}","received_events_url":"https://api.github.com/users/simplyianm/received_events","type":"User","site_admin":false},"repo":{"id":46445798,"name":"koa","full_name":"simplyianm/koa","owner":{"login":"simplyianm","id":401263,"avatar_url":"https://avatars.githubusercontent.com/u/401263?v=3","gravatar_id":"","url":"https://api.github.com/users/simplyianm","html_url":"https://github.com/simplyianm","followers_url":"https://api.github.com/users/simplyianm/followers","following_url":"https://api.github.com/users/simplyianm/following{/other_user}","gists_url":"https://api.github.com/users/simplyianm/gists{/gist_id}","starred_url":"https://api.github.com/users/simplyianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplyianm/subscriptions","organizations_url":"https://api.github.com/users/simplyianm/orgs","repos_url":"https://api.github.com/users/simplyianm/repos","events_url":"https://api.github.com/users/simplyianm/events{/privacy}","received_events_url":"https://api.github.com/users/simplyianm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simplyianm/koa","description":"Expressive middleware for node.js using generators","fork":true,"url":"https://api.github.com/repos/simplyianm/koa","forks_url":"https://api.github.com/repos/simplyianm/koa/forks","keys_url":"https://api.github.com/repos/simplyianm/koa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simplyianm/koa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simplyianm/koa/teams","hooks_url":"https://api.github.com/repos/simplyianm/koa/hooks","issue_events_url":"https://api.github.com/repos/simplyianm/koa/issues/events{/number}","events_url":"https://api.github.com/repos/simplyianm/koa/events","assignees_url":"https://api.github.com/repos/simplyianm/koa/assignees{/user}","branches_url":"https://api.github.com/repos/simplyianm/koa/branches{/branch}","tags_url":"https://api.github.com/repos/simplyianm/koa/tags","blobs_url":"https://api.github.com/repos/simplyianm/koa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simplyianm/koa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simplyianm/koa/git/refs{/sha}","trees_url":"https://api.github.com/repos/simplyianm/koa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simplyianm/koa/statuses/{sha}","languages_url":"https://api.github.com/repos/simplyianm/koa/languages","stargazers_url":"https://api.github.com/repos/simplyianm/koa/stargazers","contributors_url":"https://api.github.com/repos/simplyianm/koa/contributors","subscribers_url":"https://api.github.com/repos/simplyianm/koa/subscribers","subscription_url":"https://api.github.com/repos/simplyianm/koa/subscription","commits_url":"https://api.github.com/repos/simplyianm/koa/commits{/sha}","git_commits_url":"https://api.github.com/repos/simplyianm/koa/git/commits{/sha}","comments_url":"https://api.github.com/repos/simplyianm/koa/comments{/number}","issue_comment_url":"https://api.github.com/repos/simplyianm/koa/issues/comments{/number}","contents_url":"https://api.github.com/repos/simplyianm/koa/contents/{+path}","compare_url":"https://api.github.com/repos/simplyianm/koa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simplyianm/koa/merges","archive_url":"https://api.github.com/repos/simplyianm/koa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simplyianm/koa/downloads","issues_url":"https://api.github.com/repos/simplyianm/koa/issues{/number}","pulls_url":"https://api.github.com/repos/simplyianm/koa/pulls{/number}","milestones_url":"https://api.github.com/repos/simplyianm/koa/milestones{/number}","notifications_url":"https://api.github.com/repos/simplyianm/koa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simplyianm/koa/labels{/name}","releases_url":"https://api.github.com/repos/simplyianm/koa/releases{/id}","created_at":"2015-11-18T20:34:15Z","updated_at":"2015-11-18T20:34:16Z","pushed_at":"2015-11-19T03:15:07Z","git_url":"git://github.com/simplyianm/koa.git","ssh_url":"git@github.com:simplyianm/koa.git","clone_url":"https://github.com/simplyianm/koa.git","svn_url":"https://github.com/simplyianm/koa","homepage":"http://koajs.com","size":1510,"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":"koajs:master","ref":"master","sha":"6a5c2e529aad68d1b5f404e5a3ea1515dcf1588b","user":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"repo":{"id":11551538,"name":"koa","full_name":"koajs/koa","owner":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koajs/koa","description":"Expressive middleware for node.js using generators","fork":false,"url":"https://api.github.com/repos/koajs/koa","forks_url":"https://api.github.com/repos/koajs/koa/forks","keys_url":"https://api.github.com/repos/koajs/koa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koajs/koa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koajs/koa/teams","hooks_url":"https://api.github.com/repos/koajs/koa/hooks","issue_events_url":"https://api.github.com/repos/koajs/koa/issues/events{/number}","events_url":"https://api.github.com/repos/koajs/koa/events","assignees_url":"https://api.github.com/repos/koajs/koa/assignees{/user}","branches_url":"https://api.github.com/repos/koajs/koa/branches{/branch}","tags_url":"https://api.github.com/repos/koajs/koa/tags","blobs_url":"https://api.github.com/repos/koajs/koa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koajs/koa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koajs/koa/git/refs{/sha}","trees_url":"https://api.github.com/repos/koajs/koa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koajs/koa/statuses/{sha}","languages_url":"https://api.github.com/repos/koajs/koa/languages","stargazers_url":"https://api.github.com/repos/koajs/koa/stargazers","contributors_url":"https://api.github.com/repos/koajs/koa/contributors","subscribers_url":"https://api.github.com/repos/koajs/koa/subscribers","subscription_url":"https://api.github.com/repos/koajs/koa/subscription","commits_url":"https://api.github.com/repos/koajs/koa/commits{/sha}","git_commits_url":"https://api.github.com/repos/koajs/koa/git/commits{/sha}","comments_url":"https://api.github.com/repos/koajs/koa/comments{/number}","issue_comment_url":"https://api.github.com/repos/koajs/koa/issues/comments{/number}","contents_url":"https://api.github.com/repos/koajs/koa/contents/{+path}","compare_url":"https://api.github.com/repos/koajs/koa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koajs/koa/merges","archive_url":"https://api.github.com/repos/koajs/koa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koajs/koa/downloads","issues_url":"https://api.github.com/repos/koajs/koa/issues{/number}","pulls_url":"https://api.github.com/repos/koajs/koa/pulls{/number}","milestones_url":"https://api.github.com/repos/koajs/koa/milestones{/number}","notifications_url":"https://api.github.com/repos/koajs/koa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koajs/koa/labels{/name}","releases_url":"https://api.github.com/repos/koajs/koa/releases{/id}","created_at":"2013-07-20T18:53:45Z","updated_at":"2015-11-19T13:11:22Z","pushed_at":"2015-11-19T03:15:07Z","git_url":"git://github.com/koajs/koa.git","ssh_url":"git@github.com:koajs/koa.git","clone_url":"https://github.com/koajs/koa.git","svn_url":"https://github.com/koajs/koa","homepage":"http://koajs.com","size":5108,"stargazers_count":7765,"watchers_count":7765,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":601,"mirror_url":null,"open_issues_count":27,"forks":601,"open_issues":27,"watchers":7765,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koajs/koa/pulls/597"},"html":{"href":"https://github.com/koajs/koa/pull/597"},"issue":{"href":"https://api.github.com/repos/koajs/koa/issues/597"},"comments":{"href":"https://api.github.com/repos/koajs/koa/issues/597/comments"},"review_comments":{"href":"https://api.github.com/repos/koajs/koa/pulls/597/comments"},"review_comment":{"href":"https://api.github.com/repos/koajs/koa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koajs/koa/pulls/597/commits"},"statuses":{"href":"https://api.github.com/repos/koajs/koa/statuses/33467bf49d00a145ba5172d99d3ed9718ff4e108"}}}}