{"action":"closed","number":3125,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/3125","id":46361742,"html_url":"https://github.com/nodejs/node/pull/3125","diff_url":"https://github.com/nodejs/node/pull/3125.diff","patch_url":"https://github.com/nodejs/node/pull/3125.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/3125","number":3125,"state":"closed","locked":false,"title":"contextify: use assert instead of `if`","user":{"login":"obastemur","id":4390745,"avatar_url":"https://avatars.githubusercontent.com/u/4390745?v=3","gravatar_id":"","url":"https://api.github.com/users/obastemur","html_url":"https://github.com/obastemur","followers_url":"https://api.github.com/users/obastemur/followers","following_url":"https://api.github.com/users/obastemur/following{/other_user}","gists_url":"https://api.github.com/users/obastemur/gists{/gist_id}","starred_url":"https://api.github.com/users/obastemur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obastemur/subscriptions","organizations_url":"https://api.github.com/users/obastemur/orgs","repos_url":"https://api.github.com/users/obastemur/repos","events_url":"https://api.github.com/users/obastemur/events{/privacy}","received_events_url":"https://api.github.com/users/obastemur/received_events","type":"User","site_admin":false},"body":"I was walking through the vm changes and saw this particular `if` check is interesting. In case `ctx` is empty it's going to fail later anyways. \r\n\r\nSo, instead of putting an `if` check there;\r\n\r\noption a - use assert \r\noption b - do nothing\r\n\r\nConsidering the developer wanted to make sure `ctx` is not empty, `assert` option looked more convenient.","created_at":"2015-09-30T05:03:05Z","updated_at":"2015-10-01T19:15:20Z","closed_at":"2015-10-01T19:15:20Z","merged_at":null,"merge_commit_sha":"67d0188236f79f7c2cf387d5c6a49529cb8f63a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/3125/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/3125/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/3125/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/f9ba0dc01e240d0587aae622df8bd964414954db","head":{"label":"obastemur:patch-1","ref":"patch-1","sha":"f9ba0dc01e240d0587aae622df8bd964414954db","user":{"login":"obastemur","id":4390745,"avatar_url":"https://avatars.githubusercontent.com/u/4390745?v=3","gravatar_id":"","url":"https://api.github.com/users/obastemur","html_url":"https://github.com/obastemur","followers_url":"https://api.github.com/users/obastemur/followers","following_url":"https://api.github.com/users/obastemur/following{/other_user}","gists_url":"https://api.github.com/users/obastemur/gists{/gist_id}","starred_url":"https://api.github.com/users/obastemur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obastemur/subscriptions","organizations_url":"https://api.github.com/users/obastemur/orgs","repos_url":"https://api.github.com/users/obastemur/repos","events_url":"https://api.github.com/users/obastemur/events{/privacy}","received_events_url":"https://api.github.com/users/obastemur/received_events","type":"User","site_admin":false},"repo":{"id":43412729,"name":"node-1","full_name":"obastemur/node-1","owner":{"login":"obastemur","id":4390745,"avatar_url":"https://avatars.githubusercontent.com/u/4390745?v=3","gravatar_id":"","url":"https://api.github.com/users/obastemur","html_url":"https://github.com/obastemur","followers_url":"https://api.github.com/users/obastemur/followers","following_url":"https://api.github.com/users/obastemur/following{/other_user}","gists_url":"https://api.github.com/users/obastemur/gists{/gist_id}","starred_url":"https://api.github.com/users/obastemur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obastemur/subscriptions","organizations_url":"https://api.github.com/users/obastemur/orgs","repos_url":"https://api.github.com/users/obastemur/repos","events_url":"https://api.github.com/users/obastemur/events{/privacy}","received_events_url":"https://api.github.com/users/obastemur/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/obastemur/node-1","description":"✨Node.js  ✨","fork":true,"url":"https://api.github.com/repos/obastemur/node-1","forks_url":"https://api.github.com/repos/obastemur/node-1/forks","keys_url":"https://api.github.com/repos/obastemur/node-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obastemur/node-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obastemur/node-1/teams","hooks_url":"https://api.github.com/repos/obastemur/node-1/hooks","issue_events_url":"https://api.github.com/repos/obastemur/node-1/issues/events{/number}","events_url":"https://api.github.com/repos/obastemur/node-1/events","assignees_url":"https://api.github.com/repos/obastemur/node-1/assignees{/user}","branches_url":"https://api.github.com/repos/obastemur/node-1/branches{/branch}","tags_url":"https://api.github.com/repos/obastemur/node-1/tags","blobs_url":"https://api.github.com/repos/obastemur/node-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obastemur/node-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obastemur/node-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/obastemur/node-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obastemur/node-1/statuses/{sha}","languages_url":"https://api.github.com/repos/obastemur/node-1/languages","stargazers_url":"https://api.github.com/repos/obastemur/node-1/stargazers","contributors_url":"https://api.github.com/repos/obastemur/node-1/contributors","subscribers_url":"https://api.github.com/repos/obastemur/node-1/subscribers","subscription_url":"https://api.github.com/repos/obastemur/node-1/subscription","commits_url":"https://api.github.com/repos/obastemur/node-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/obastemur/node-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/obastemur/node-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/obastemur/node-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/obastemur/node-1/contents/{+path}","compare_url":"https://api.github.com/repos/obastemur/node-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obastemur/node-1/merges","archive_url":"https://api.github.com/repos/obastemur/node-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obastemur/node-1/downloads","issues_url":"https://api.github.com/repos/obastemur/node-1/issues{/number}","pulls_url":"https://api.github.com/repos/obastemur/node-1/pulls{/number}","milestones_url":"https://api.github.com/repos/obastemur/node-1/milestones{/number}","notifications_url":"https://api.github.com/repos/obastemur/node-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obastemur/node-1/labels{/name}","releases_url":"https://api.github.com/repos/obastemur/node-1/releases{/id}","created_at":"2015-09-30T04:56:23Z","updated_at":"2015-09-30T04:56:43Z","pushed_at":"2015-09-30T16:26:06Z","git_url":"git://github.com/obastemur/node-1.git","ssh_url":"git@github.com:obastemur/node-1.git","clone_url":"https://github.com/obastemur/node-1.git","svn_url":"https://github.com/obastemur/node-1","homepage":"https://nodejs.org","size":148622,"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":"nodejs:master","ref":"master","sha":"f1d27d27f59a14dbe561aa4b8bf403484ba97e36","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"✨Node.js  ✨","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-10-01T18:49:34Z","pushed_at":"2015-10-01T19:13:10Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":366157,"stargazers_count":15706,"watchers_count":15706,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1441,"mirror_url":null,"open_issues_count":496,"forks":1441,"open_issues":496,"watchers":15706,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/3125"},"html":{"href":"https://github.com/nodejs/node/pull/3125"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/3125"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/3125/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/3125/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/3125/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/f9ba0dc01e240d0587aae622df8bd964414954db"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":1,"commits":2,"additions":3,"deletions":2,"changed_files":1}}