{"action":"closed","number":18,"pull_request":{"url":"https://api.github.com/repos/talyssonoc/structure/pulls/18","id":99672176,"html_url":"https://github.com/talyssonoc/structure/pull/18","diff_url":"https://github.com/talyssonoc/structure/pull/18.diff","patch_url":"https://github.com/talyssonoc/structure/pull/18.patch","issue_url":"https://api.github.com/repos/talyssonoc/structure/issues/18","number":18,"state":"closed","locked":false,"title":"Refactor validation api","user":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"body":"This PR refactors the validation API:\r\n\r\nBefore:\r\n\r\n```javascript\r\nconst user = new User();\r\n\r\nuser.isValid(); // false\r\nuser.errors; // array os errors, only filled after calling `isValid()`\r\n```\r\n\r\nAfter:\r\n\r\n```javascript\r\nconst user = new User();\r\n\r\nconst { valid, errors }  = user.validate();\r\nvalid; // false\r\nerrors; // array of errors\r\n```","created_at":"2016-12-29T16:14:23Z","updated_at":"2016-12-30T15:00:45Z","closed_at":"2016-12-30T15:00:45Z","merged_at":"2016-12-30T15:00:45Z","merge_commit_sha":"477a553037e7af724fce6f822a11692f47360d49","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/talyssonoc/structure/pulls/18/commits","review_comments_url":"https://api.github.com/repos/talyssonoc/structure/pulls/18/comments","review_comment_url":"https://api.github.com/repos/talyssonoc/structure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/talyssonoc/structure/issues/18/comments","statuses_url":"https://api.github.com/repos/talyssonoc/structure/statuses/86aabeafbfd5ca018efb19ff11c602f030326f12","head":{"label":"talyssonoc:refactor-validation-api","ref":"refactor-validation-api","sha":"86aabeafbfd5ca018efb19ff11c602f030326f12","user":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"repo":{"id":70779496,"name":"structure","full_name":"talyssonoc/structure","owner":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/talyssonoc/structure","description":"A simple schema/attributes library built on top of modern JavaScript","fork":false,"url":"https://api.github.com/repos/talyssonoc/structure","forks_url":"https://api.github.com/repos/talyssonoc/structure/forks","keys_url":"https://api.github.com/repos/talyssonoc/structure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/talyssonoc/structure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/talyssonoc/structure/teams","hooks_url":"https://api.github.com/repos/talyssonoc/structure/hooks","issue_events_url":"https://api.github.com/repos/talyssonoc/structure/issues/events{/number}","events_url":"https://api.github.com/repos/talyssonoc/structure/events","assignees_url":"https://api.github.com/repos/talyssonoc/structure/assignees{/user}","branches_url":"https://api.github.com/repos/talyssonoc/structure/branches{/branch}","tags_url":"https://api.github.com/repos/talyssonoc/structure/tags","blobs_url":"https://api.github.com/repos/talyssonoc/structure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/talyssonoc/structure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/talyssonoc/structure/git/refs{/sha}","trees_url":"https://api.github.com/repos/talyssonoc/structure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/talyssonoc/structure/statuses/{sha}","languages_url":"https://api.github.com/repos/talyssonoc/structure/languages","stargazers_url":"https://api.github.com/repos/talyssonoc/structure/stargazers","contributors_url":"https://api.github.com/repos/talyssonoc/structure/contributors","subscribers_url":"https://api.github.com/repos/talyssonoc/structure/subscribers","subscription_url":"https://api.github.com/repos/talyssonoc/structure/subscription","commits_url":"https://api.github.com/repos/talyssonoc/structure/commits{/sha}","git_commits_url":"https://api.github.com/repos/talyssonoc/structure/git/commits{/sha}","comments_url":"https://api.github.com/repos/talyssonoc/structure/comments{/number}","issue_comment_url":"https://api.github.com/repos/talyssonoc/structure/issues/comments{/number}","contents_url":"https://api.github.com/repos/talyssonoc/structure/contents/{+path}","compare_url":"https://api.github.com/repos/talyssonoc/structure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/talyssonoc/structure/merges","archive_url":"https://api.github.com/repos/talyssonoc/structure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/talyssonoc/structure/downloads","issues_url":"https://api.github.com/repos/talyssonoc/structure/issues{/number}","pulls_url":"https://api.github.com/repos/talyssonoc/structure/pulls{/number}","milestones_url":"https://api.github.com/repos/talyssonoc/structure/milestones{/number}","notifications_url":"https://api.github.com/repos/talyssonoc/structure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/talyssonoc/structure/labels{/name}","releases_url":"https://api.github.com/repos/talyssonoc/structure/releases{/id}","deployments_url":"https://api.github.com/repos/talyssonoc/structure/deployments","created_at":"2016-10-13T07:15:19Z","updated_at":"2016-12-27T20:01:58Z","pushed_at":"2016-12-30T15:00:45Z","git_url":"git://github.com/talyssonoc/structure.git","ssh_url":"git@github.com:talyssonoc/structure.git","clone_url":"https://github.com/talyssonoc/structure.git","svn_url":"https://github.com/talyssonoc/structure","homepage":"","size":317,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"talyssonoc:master","ref":"master","sha":"7983ebbeb3b7b2dfd2e50f5c2d1340d324981f74","user":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"repo":{"id":70779496,"name":"structure","full_name":"talyssonoc/structure","owner":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/talyssonoc/structure","description":"A simple schema/attributes library built on top of modern JavaScript","fork":false,"url":"https://api.github.com/repos/talyssonoc/structure","forks_url":"https://api.github.com/repos/talyssonoc/structure/forks","keys_url":"https://api.github.com/repos/talyssonoc/structure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/talyssonoc/structure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/talyssonoc/structure/teams","hooks_url":"https://api.github.com/repos/talyssonoc/structure/hooks","issue_events_url":"https://api.github.com/repos/talyssonoc/structure/issues/events{/number}","events_url":"https://api.github.com/repos/talyssonoc/structure/events","assignees_url":"https://api.github.com/repos/talyssonoc/structure/assignees{/user}","branches_url":"https://api.github.com/repos/talyssonoc/structure/branches{/branch}","tags_url":"https://api.github.com/repos/talyssonoc/structure/tags","blobs_url":"https://api.github.com/repos/talyssonoc/structure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/talyssonoc/structure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/talyssonoc/structure/git/refs{/sha}","trees_url":"https://api.github.com/repos/talyssonoc/structure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/talyssonoc/structure/statuses/{sha}","languages_url":"https://api.github.com/repos/talyssonoc/structure/languages","stargazers_url":"https://api.github.com/repos/talyssonoc/structure/stargazers","contributors_url":"https://api.github.com/repos/talyssonoc/structure/contributors","subscribers_url":"https://api.github.com/repos/talyssonoc/structure/subscribers","subscription_url":"https://api.github.com/repos/talyssonoc/structure/subscription","commits_url":"https://api.github.com/repos/talyssonoc/structure/commits{/sha}","git_commits_url":"https://api.github.com/repos/talyssonoc/structure/git/commits{/sha}","comments_url":"https://api.github.com/repos/talyssonoc/structure/comments{/number}","issue_comment_url":"https://api.github.com/repos/talyssonoc/structure/issues/comments{/number}","contents_url":"https://api.github.com/repos/talyssonoc/structure/contents/{+path}","compare_url":"https://api.github.com/repos/talyssonoc/structure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/talyssonoc/structure/merges","archive_url":"https://api.github.com/repos/talyssonoc/structure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/talyssonoc/structure/downloads","issues_url":"https://api.github.com/repos/talyssonoc/structure/issues{/number}","pulls_url":"https://api.github.com/repos/talyssonoc/structure/pulls{/number}","milestones_url":"https://api.github.com/repos/talyssonoc/structure/milestones{/number}","notifications_url":"https://api.github.com/repos/talyssonoc/structure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/talyssonoc/structure/labels{/name}","releases_url":"https://api.github.com/repos/talyssonoc/structure/releases{/id}","deployments_url":"https://api.github.com/repos/talyssonoc/structure/deployments","created_at":"2016-10-13T07:15:19Z","updated_at":"2016-12-27T20:01:58Z","pushed_at":"2016-12-30T15:00:45Z","git_url":"git://github.com/talyssonoc/structure.git","ssh_url":"git@github.com:talyssonoc/structure.git","clone_url":"https://github.com/talyssonoc/structure.git","svn_url":"https://github.com/talyssonoc/structure","homepage":"","size":317,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/talyssonoc/structure/pulls/18"},"html":{"href":"https://github.com/talyssonoc/structure/pull/18"},"issue":{"href":"https://api.github.com/repos/talyssonoc/structure/issues/18"},"comments":{"href":"https://api.github.com/repos/talyssonoc/structure/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/talyssonoc/structure/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/talyssonoc/structure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/talyssonoc/structure/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/talyssonoc/structure/statuses/86aabeafbfd5ca018efb19ff11c602f030326f12"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"talyssonoc","id":4325587,"avatar_url":"https://avatars.githubusercontent.com/u/4325587?v=3","gravatar_id":"","url":"https://api.github.com/users/talyssonoc","html_url":"https://github.com/talyssonoc","followers_url":"https://api.github.com/users/talyssonoc/followers","following_url":"https://api.github.com/users/talyssonoc/following{/other_user}","gists_url":"https://api.github.com/users/talyssonoc/gists{/gist_id}","starred_url":"https://api.github.com/users/talyssonoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talyssonoc/subscriptions","organizations_url":"https://api.github.com/users/talyssonoc/orgs","repos_url":"https://api.github.com/users/talyssonoc/repos","events_url":"https://api.github.com/users/talyssonoc/events{/privacy}","received_events_url":"https://api.github.com/users/talyssonoc/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":143,"deletions":330,"changed_files":11}}
{"actor":{"display_login":"talyssonoc"}}