GitHub PullRequestEvent at 2014-07-23 23:21:34
Repository: joi
Actor: danielb2
Payload: {"action":"opened","number":385,"pull_request":{"url":"https://api.github.com/repos/spumko/joi/pulls/385","id":18809573,"html_url":"https://github.com/spumko/joi/pull/385","diff_url":"https://github.com/spumko/joi/pull/385.diff","patch_url":"https://github.com/spumko/joi/pull/385.patch","issue_url":"https://api.github.com/repos/spumko/joi/issues/385","number":385,"state":"open","title":"Path for array includes to contain key","user":{"login":"danielb2","id":26678,"avatar_url":"https://avatars.githubusercontent.com/u/26678?","gravatar_id":"52d70ec6de0a355d7796e198b73f0cc4","url":"https://api.github.com/users/danielb2","html_url":"https://github.com/danielb2","followers_url":"https://api.github.com/users/danielb2/followers","following_url":"https://api.github.com/users/danielb2/following{/other_user}","gists_url":"https://api.github.com/users/danielb2/gists{/gist_id}","starred_url":"https://api.github.com/users/danielb2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielb2/subscriptions","organizations_url":"https://api.github.com/users/danielb2/orgs","repos_url":"https://api.github.com/users/danielb2/repos","events_url":"https://api.github.com/users/danielb2/events{/privacy}","received_events_url":"https://api.github.com/users/danielb2/received_events","type":"User","site_admin":false},"body":"Current behavior for an array including an object leaves the `path` without a key in the object.\r\n\r\nA message will read correctly: `\"message: 'x position 1 fails because x must be a number\"`\r\nWhile the corresponding path is: `\"x.1\"`\r\nThis fix changes the path to read: `\"x.1.x\"` which then also matches the error message.\r\n\r\nThis also matches the array behavior with how objects handle the same; where the final key is referenced that has the error occurring.\r\n\r\n__Assumptions__:  There will only be one reason so the error will be the first in the array (hence `context.reason.0`) . I couldn't find any case where it would be anything else.","created_at":"2014-07-23T23:21:34Z","updated_at":"2014-07-23T23:21:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spumko/joi/pulls/385/commits","review_comments_url":"https://api.github.com/repos/spumko/joi/pulls/385/comments","review_comment_url":"https://api.github.com/repos/spumko/joi/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spumko/joi/issues/385/comments","statuses_url":"https://api.github.com/repos/spumko/joi/statuses/1691f92ed13704bca71029f28059439a192a3b26","head":{"label":"danielb2:key.fixes","ref":"key.fixes","sha":"1691f92ed13704bca71029f28059439a192a3b26","user":{"login":"danielb2","id":26678,"avatar_url":"https://avatars.githubusercontent.com/u/26678?","gravatar_id":"52d70ec6de0a355d7796e198b73f0cc4","url":"https://api.github.com/users/danielb2","html_url":"https://github.com/danielb2","followers_url":"https://api.github.com/users/danielb2/followers","following_url":"https://api.github.com/users/danielb2/following{/other_user}","gists_url":"https://api.github.com/users/danielb2/gists{/gist_id}","starred_url":"https://api.github.com/users/danielb2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielb2/subscriptions","organizations_url":"https://api.github.com/users/danielb2/orgs","repos_url":"https://api.github.com/users/danielb2/repos","events_url":"https://api.github.com/users/danielb2/events{/privacy}","received_events_url":"https://api.github.com/users/danielb2/received_events","type":"User","site_admin":false},"repo":{"id":13250008,"name":"joi","full_name":"danielb2/joi","owner":{"login":"danielb2","id":26678,"avatar_url":"https://avatars.githubusercontent.com/u/26678?","gravatar_id":"52d70ec6de0a355d7796e198b73f0cc4","url":"https://api.github.com/users/danielb2","html_url":"https://github.com/danielb2","followers_url":"https://api.github.com/users/danielb2/followers","following_url":"https://api.github.com/users/danielb2/following{/other_user}","gists_url":"https://api.github.com/users/danielb2/gists{/gist_id}","starred_url":"https://api.github.com/users/danielb2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielb2/subscriptions","organizations_url":"https://api.github.com/users/danielb2/orgs","repos_url":"https://api.github.com/users/danielb2/repos","events_url":"https://api.github.com/users/danielb2/events{/privacy}","received_events_url":"https://api.github.com/users/danielb2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielb2/joi","description":"Object schema validation","fork":true,"url":"https://api.github.com/repos/danielb2/joi","forks_url":"https://api.github.com/repos/danielb2/joi/forks","keys_url":"https://api.github.com/repos/danielb2/joi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielb2/joi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielb2/joi/teams","hooks_url":"https://api.github.com/repos/danielb2/joi/hooks","issue_events_url":"https://api.github.com/repos/danielb2/joi/issues/events{/number}","events_url":"https://api.github.com/repos/danielb2/joi/events","assignees_url":"https://api.github.com/repos/danielb2/joi/assignees{/user}","branches_url":"https://api.github.com/repos/danielb2/joi/branches{/branch}","tags_url":"https://api.github.com/repos/danielb2/joi/tags","blobs_url":"https://api.github.com/repos/danielb2/joi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielb2/joi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielb2/joi/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielb2/joi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielb2/joi/statuses/{sha}","languages_url":"https://api.github.com/repos/danielb2/joi/languages","stargazers_url":"https://api.github.com/repos/danielb2/joi/stargazers","contributors_url":"https://api.github.com/repos/danielb2/joi/contributors","subscribers_url":"https://api.github.com/repos/danielb2/joi/subscribers","subscription_url":"https://api.github.com/repos/danielb2/joi/subscription","commits_url":"https://api.github.com/repos/danielb2/joi/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielb2/joi/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielb2/joi/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielb2/joi/issues/comments/{number}","contents_url":"https://api.github.com/repos/danielb2/joi/contents/{+path}","compare_url":"https://api.github.com/repos/danielb2/joi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielb2/joi/merges","archive_url":"https://api.github.com/repos/danielb2/joi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielb2/joi/downloads","issues_url":"https://api.github.com/repos/danielb2/joi/issues{/number}","pulls_url":"https://api.github.com/repos/danielb2/joi/pulls{/number}","milestones_url":"https://api.github.com/repos/danielb2/joi/milestones{/number}","notifications_url":"https://api.github.com/repos/danielb2/joi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielb2/joi/labels{/name}","releases_url":"https://api.github.com/repos/danielb2/joi/releases{/id}","created_at":"2013-10-01T17:02:38Z","updated_at":"2014-07-23T17:10:57Z","pushed_at":"2014-07-23T23:16:09Z","git_url":"git://github.com/danielb2/joi.git","ssh_url":"git@github.com:danielb2/joi.git","clone_url":"https://github.com/danielb2/joi.git","svn_url":"https://github.com/danielb2/joi","homepage":null,"size":1176,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"master"}},"base":{"label":"spumko:master","ref":"master","sha":"77016f63a8316c72154ec2919b34b7dfd6942b6b","user":{"login":"spumko","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?","gravatar_id":"f92bf459d5586119421f403f61ace549","url":"https://api.github.com/users/spumko","html_url":"https://github.com/spumko","followers_url":"https://api.github.com/users/spumko/followers","following_url":"https://api.github.com/users/spumko/following{/other_user}","gists_url":"https://api.github.com/users/spumko/gists{/gist_id}","starred_url":"https://api.github.com/users/spumko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spumko/subscriptions","organizations_url":"https://api.github.com/users/spumko/orgs","repos_url":"https://api.github.com/users/spumko/repos","events_url":"https://api.github.com/users/spumko/events{/privacy}","received_events_url":"https://api.github.com/users/spumko/received_events","type":"Organization","site_admin":false},"repo":{"id":5830987,"name":"joi","full_name":"spumko/joi","owner":{"login":"spumko","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?","gravatar_id":"f92bf459d5586119421f403f61ace549","url":"https://api.github.com/users/spumko","html_url":"https://github.com/spumko","followers_url":"https://api.github.com/users/spumko/followers","following_url":"https://api.github.com/users/spumko/following{/other_user}","gists_url":"https://api.github.com/users/spumko/gists{/gist_id}","starred_url":"https://api.github.com/users/spumko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spumko/subscriptions","organizations_url":"https://api.github.com/users/spumko/orgs","repos_url":"https://api.github.com/users/spumko/repos","events_url":"https://api.github.com/users/spumko/events{/privacy}","received_events_url":"https://api.github.com/users/spumko/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spumko/joi","description":"Object schema validation","fork":false,"url":"https://api.github.com/repos/spumko/joi","forks_url":"https://api.github.com/repos/spumko/joi/forks","keys_url":"https://api.github.com/repos/spumko/joi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spumko/joi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spumko/joi/teams","hooks_url":"https://api.github.com/repos/spumko/joi/hooks","issue_events_url":"https://api.github.com/repos/spumko/joi/issues/events{/number}","events_url":"https://api.github.com/repos/spumko/joi/events","assignees_url":"https://api.github.com/repos/spumko/joi/assignees{/user}","branches_url":"https://api.github.com/repos/spumko/joi/branches{/branch}","tags_url":"https://api.github.com/repos/spumko/joi/tags","blobs_url":"https://api.github.com/repos/spumko/joi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spumko/joi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spumko/joi/git/refs{/sha}","trees_url":"https://api.github.com/repos/spumko/joi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spumko/joi/statuses/{sha}","languages_url":"https://api.github.com/repos/spumko/joi/languages","stargazers_url":"https://api.github.com/repos/spumko/joi/stargazers","contributors_url":"https://api.github.com/repos/spumko/joi/contributors","subscribers_url":"https://api.github.com/repos/spumko/joi/subscribers","subscription_url":"https://api.github.com/repos/spumko/joi/subscription","commits_url":"https://api.github.com/repos/spumko/joi/commits{/sha}","git_commits_url":"https://api.github.com/repos/spumko/joi/git/commits{/sha}","comments_url":"https://api.github.com/repos/spumko/joi/comments{/number}","issue_comment_url":"https://api.github.com/repos/spumko/joi/issues/comments/{number}","contents_url":"https://api.github.com/repos/spumko/joi/contents/{+path}","compare_url":"https://api.github.com/repos/spumko/joi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spumko/joi/merges","archive_url":"https://api.github.com/repos/spumko/joi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spumko/joi/downloads","issues_url":"https://api.github.com/repos/spumko/joi/issues{/number}","pulls_url":"https://api.github.com/repos/spumko/joi/pulls{/number}","milestones_url":"https://api.github.com/repos/spumko/joi/milestones{/number}","notifications_url":"https://api.github.com/repos/spumko/joi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spumko/joi/labels{/name}","releases_url":"https://api.github.com/repos/spumko/joi/releases{/id}","created_at":"2012-09-16T16:38:06Z","updated_at":"2014-07-23T09:03:16Z","pushed_at":"2014-07-15T01:17:07Z","git_url":"git://github.com/spumko/joi.git","ssh_url":"git@github.com:spumko/joi.git","clone_url":"https://github.com/spumko/joi.git","svn_url":"https://github.com/spumko/joi","homepage":null,"size":4416,"stargazers_count":445,"watchers_count":445,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":88,"mirror_url":null,"open_issues_count":14,"forks":88,"open_issues":14,"watchers":445,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spumko/joi/pulls/385"},"html":{"href":"https://github.com/spumko/joi/pull/385"},"issue":{"href":"https://api.github.com/repos/spumko/joi/issues/385"},"comments":{"href":"https://api.github.com/repos/spumko/joi/issues/385/comments"},"review_comments":{"href":"https://api.github.com/repos/spumko/joi/pulls/385/comments"},"review_comment":{"href":"https://api.github.com/repos/spumko/joi/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spumko/joi/pulls/385/commits"},"statuses":{"href":"https://api.github.com/repos/spumko/joi/statuses/1691f92ed13704bca71029f28059439a192a3b26"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":20,"deletions":6,"changed_files":4}}