{"action":"closed","number":4,"pull_request":{"url":"https://api.github.com/repos/pinax/pinax-api/pulls/4","id":69188514,"html_url":"https://github.com/pinax/pinax-api/pull/4","diff_url":"https://github.com/pinax/pinax-api/pull/4.diff","patch_url":"https://github.com/pinax/pinax-api/pull/4.patch","issue_url":"https://api.github.com/repos/pinax/pinax-api/issues/4","number":4,"state":"closed","locked":false,"title":"Adding validate_collection()","user":{"login":"grahamu","id":130456,"avatar_url":"https://avatars.githubusercontent.com/u/130456?v=3","gravatar_id":"","url":"https://api.github.com/users/grahamu","html_url":"https://github.com/grahamu","followers_url":"https://api.github.com/users/grahamu/followers","following_url":"https://api.github.com/users/grahamu/following{/other_user}","gists_url":"https://api.github.com/users/grahamu/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamu/subscriptions","organizations_url":"https://api.github.com/users/grahamu/orgs","repos_url":"https://api.github.com/users/grahamu/repos","events_url":"https://api.github.com/users/grahamu/events{/privacy}","received_events_url":"https://api.github.com/users/grahamu/received_events","type":"User","site_admin":false},"body":"This PR adds a method for validating \"to-many\" resource relationship data. Since the current `validate` method is wrapped by the `@contextmanager` decorator, we cannot return an iterable, and would rather not return a list of resources. Therefore a new generator method is introduced: `validate_collection`. Both methods call `validate_resource` (new method factored out from `validate`).\r\n\r\nUse of `validate_resource`:\r\n\r\n```\r\n        tags = [resource.obj.name for resource in self.validate_collection(self.resource_class)]\r\n        self.account.tags.add(*tags)\r\n```","created_at":"2016-05-06T18:09:59Z","updated_at":"2016-05-11T15:40:01Z","closed_at":"2016-05-11T15:40:01Z","merged_at":null,"merge_commit_sha":"17a7ee119f30f8df47efdb1d3279ee54f47915df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pinax/pinax-api/pulls/4/commits","review_comments_url":"https://api.github.com/repos/pinax/pinax-api/pulls/4/comments","review_comment_url":"https://api.github.com/repos/pinax/pinax-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pinax/pinax-api/issues/4/comments","statuses_url":"https://api.github.com/repos/pinax/pinax-api/statuses/f1ffb69a269f3b6abffbed248b43a4cc832a41f1","head":{"label":"grahamu:validate-collection","ref":"validate-collection","sha":"f1ffb69a269f3b6abffbed248b43a4cc832a41f1","user":{"login":"grahamu","id":130456,"avatar_url":"https://avatars.githubusercontent.com/u/130456?v=3","gravatar_id":"","url":"https://api.github.com/users/grahamu","html_url":"https://github.com/grahamu","followers_url":"https://api.github.com/users/grahamu/followers","following_url":"https://api.github.com/users/grahamu/following{/other_user}","gists_url":"https://api.github.com/users/grahamu/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamu/subscriptions","organizations_url":"https://api.github.com/users/grahamu/orgs","repos_url":"https://api.github.com/users/grahamu/repos","events_url":"https://api.github.com/users/grahamu/events{/privacy}","received_events_url":"https://api.github.com/users/grahamu/received_events","type":"User","site_admin":false},"repo":{"id":54135545,"name":"pinax-api","full_name":"grahamu/pinax-api","owner":{"login":"grahamu","id":130456,"avatar_url":"https://avatars.githubusercontent.com/u/130456?v=3","gravatar_id":"","url":"https://api.github.com/users/grahamu","html_url":"https://github.com/grahamu","followers_url":"https://api.github.com/users/grahamu/followers","following_url":"https://api.github.com/users/grahamu/following{/other_user}","gists_url":"https://api.github.com/users/grahamu/gists{/gist_id}","starred_url":"https://api.github.com/users/grahamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahamu/subscriptions","organizations_url":"https://api.github.com/users/grahamu/orgs","repos_url":"https://api.github.com/users/grahamu/repos","events_url":"https://api.github.com/users/grahamu/events{/privacy}","received_events_url":"https://api.github.com/users/grahamu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grahamu/pinax-api","description":"RESTful API adhering to the JSON API specification","fork":true,"url":"https://api.github.com/repos/grahamu/pinax-api","forks_url":"https://api.github.com/repos/grahamu/pinax-api/forks","keys_url":"https://api.github.com/repos/grahamu/pinax-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grahamu/pinax-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grahamu/pinax-api/teams","hooks_url":"https://api.github.com/repos/grahamu/pinax-api/hooks","issue_events_url":"https://api.github.com/repos/grahamu/pinax-api/issues/events{/number}","events_url":"https://api.github.com/repos/grahamu/pinax-api/events","assignees_url":"https://api.github.com/repos/grahamu/pinax-api/assignees{/user}","branches_url":"https://api.github.com/repos/grahamu/pinax-api/branches{/branch}","tags_url":"https://api.github.com/repos/grahamu/pinax-api/tags","blobs_url":"https://api.github.com/repos/grahamu/pinax-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grahamu/pinax-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grahamu/pinax-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/grahamu/pinax-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grahamu/pinax-api/statuses/{sha}","languages_url":"https://api.github.com/repos/grahamu/pinax-api/languages","stargazers_url":"https://api.github.com/repos/grahamu/pinax-api/stargazers","contributors_url":"https://api.github.com/repos/grahamu/pinax-api/contributors","subscribers_url":"https://api.github.com/repos/grahamu/pinax-api/subscribers","subscription_url":"https://api.github.com/repos/grahamu/pinax-api/subscription","commits_url":"https://api.github.com/repos/grahamu/pinax-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/grahamu/pinax-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/grahamu/pinax-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/grahamu/pinax-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/grahamu/pinax-api/contents/{+path}","compare_url":"https://api.github.com/repos/grahamu/pinax-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grahamu/pinax-api/merges","archive_url":"https://api.github.com/repos/grahamu/pinax-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grahamu/pinax-api/downloads","issues_url":"https://api.github.com/repos/grahamu/pinax-api/issues{/number}","pulls_url":"https://api.github.com/repos/grahamu/pinax-api/pulls{/number}","milestones_url":"https://api.github.com/repos/grahamu/pinax-api/milestones{/number}","notifications_url":"https://api.github.com/repos/grahamu/pinax-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grahamu/pinax-api/labels{/name}","releases_url":"https://api.github.com/repos/grahamu/pinax-api/releases{/id}","deployments_url":"https://api.github.com/repos/grahamu/pinax-api/deployments","created_at":"2016-03-17T16:53:36Z","updated_at":"2016-03-17T16:53:37Z","pushed_at":"2016-05-07T02:28:54Z","git_url":"git://github.com/grahamu/pinax-api.git","ssh_url":"git@github.com:grahamu/pinax-api.git","clone_url":"https://github.com/grahamu/pinax-api.git","svn_url":"https://github.com/grahamu/pinax-api","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"pinax:master","ref":"master","sha":"e109884a2ad3439ec27cdc5d00f6ba7761c78df8","user":{"login":"pinax","id":26053,"avatar_url":"https://avatars.githubusercontent.com/u/26053?v=3","gravatar_id":"","url":"https://api.github.com/users/pinax","html_url":"https://github.com/pinax","followers_url":"https://api.github.com/users/pinax/followers","following_url":"https://api.github.com/users/pinax/following{/other_user}","gists_url":"https://api.github.com/users/pinax/gists{/gist_id}","starred_url":"https://api.github.com/users/pinax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinax/subscriptions","organizations_url":"https://api.github.com/users/pinax/orgs","repos_url":"https://api.github.com/users/pinax/repos","events_url":"https://api.github.com/users/pinax/events{/privacy}","received_events_url":"https://api.github.com/users/pinax/received_events","type":"Organization","site_admin":false},"repo":{"id":51374676,"name":"pinax-api","full_name":"pinax/pinax-api","owner":{"login":"pinax","id":26053,"avatar_url":"https://avatars.githubusercontent.com/u/26053?v=3","gravatar_id":"","url":"https://api.github.com/users/pinax","html_url":"https://github.com/pinax","followers_url":"https://api.github.com/users/pinax/followers","following_url":"https://api.github.com/users/pinax/following{/other_user}","gists_url":"https://api.github.com/users/pinax/gists{/gist_id}","starred_url":"https://api.github.com/users/pinax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinax/subscriptions","organizations_url":"https://api.github.com/users/pinax/orgs","repos_url":"https://api.github.com/users/pinax/repos","events_url":"https://api.github.com/users/pinax/events{/privacy}","received_events_url":"https://api.github.com/users/pinax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pinax/pinax-api","description":"RESTful API adhering to the JSON:API specification","fork":false,"url":"https://api.github.com/repos/pinax/pinax-api","forks_url":"https://api.github.com/repos/pinax/pinax-api/forks","keys_url":"https://api.github.com/repos/pinax/pinax-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pinax/pinax-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pinax/pinax-api/teams","hooks_url":"https://api.github.com/repos/pinax/pinax-api/hooks","issue_events_url":"https://api.github.com/repos/pinax/pinax-api/issues/events{/number}","events_url":"https://api.github.com/repos/pinax/pinax-api/events","assignees_url":"https://api.github.com/repos/pinax/pinax-api/assignees{/user}","branches_url":"https://api.github.com/repos/pinax/pinax-api/branches{/branch}","tags_url":"https://api.github.com/repos/pinax/pinax-api/tags","blobs_url":"https://api.github.com/repos/pinax/pinax-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pinax/pinax-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pinax/pinax-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/pinax/pinax-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pinax/pinax-api/statuses/{sha}","languages_url":"https://api.github.com/repos/pinax/pinax-api/languages","stargazers_url":"https://api.github.com/repos/pinax/pinax-api/stargazers","contributors_url":"https://api.github.com/repos/pinax/pinax-api/contributors","subscribers_url":"https://api.github.com/repos/pinax/pinax-api/subscribers","subscription_url":"https://api.github.com/repos/pinax/pinax-api/subscription","commits_url":"https://api.github.com/repos/pinax/pinax-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/pinax/pinax-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/pinax/pinax-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/pinax/pinax-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/pinax/pinax-api/contents/{+path}","compare_url":"https://api.github.com/repos/pinax/pinax-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pinax/pinax-api/merges","archive_url":"https://api.github.com/repos/pinax/pinax-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pinax/pinax-api/downloads","issues_url":"https://api.github.com/repos/pinax/pinax-api/issues{/number}","pulls_url":"https://api.github.com/repos/pinax/pinax-api/pulls{/number}","milestones_url":"https://api.github.com/repos/pinax/pinax-api/milestones{/number}","notifications_url":"https://api.github.com/repos/pinax/pinax-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pinax/pinax-api/labels{/name}","releases_url":"https://api.github.com/repos/pinax/pinax-api/releases{/id}","deployments_url":"https://api.github.com/repos/pinax/pinax-api/deployments","created_at":"2016-02-09T15:14:29Z","updated_at":"2016-03-18T15:09:18Z","pushed_at":"2016-05-10T23:11:06Z","git_url":"git://github.com/pinax/pinax-api.git","ssh_url":"git@github.com:pinax/pinax-api.git","clone_url":"https://github.com/pinax/pinax-api.git","svn_url":"https://github.com/pinax/pinax-api","homepage":"","size":91,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pinax/pinax-api/pulls/4"},"html":{"href":"https://github.com/pinax/pinax-api/pull/4"},"issue":{"href":"https://api.github.com/repos/pinax/pinax-api/issues/4"},"comments":{"href":"https://api.github.com/repos/pinax/pinax-api/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/pinax/pinax-api/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/pinax/pinax-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pinax/pinax-api/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/pinax/pinax-api/statuses/f1ffb69a269f3b6abffbed248b43a4cc832a41f1"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":23,"deletions":3,"changed_files":1}}