{"action":"opened","number":170,"pull_request":{"url":"https://api.github.com/repos/danthorpe/Operations/pulls/170","id":59051322,"html_url":"https://github.com/danthorpe/Operations/pull/170","diff_url":"https://github.com/danthorpe/Operations/pull/170.diff","patch_url":"https://github.com/danthorpe/Operations/pull/170.patch","issue_url":"https://api.github.com/repos/danthorpe/Operations/issues/170","number":170,"state":"open","locked":false,"title":"CloudKitOperation should conform to ResultTypeOperation","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"body":"If the consumer doesn't set the completion block on a `CloudKitOperation`, then it will \"work\" but nothing will actually happen. Errors will not get caught, and the \"result\" will not get used.\r\n\r\nSo, perhaps there should be a default completion block which allows the operation to be used as a result.\r\n\r\ni.e.\r\n\r\n```swift\r\npublic protocol CKOperationType: class {\r\n    // etc\r\n\r\n    typealias OperationResult\r\n}\r\n\r\npublic class CloudKitRecovery<T where T: NSOperation, T: CKOperationType>: ResultTypeOperation {\r\n    public typealias Result = T.OperationResult\r\n\r\n    public var result: Result? {\r\n        return getResultBlock()\r\n    }\r\n    internal var getResultBlock: (() -> Result?)? = .None\r\n}\r\n```\r\n\r\nThis would allow each `CKOperation` type to define its own \"Result\" and set a block which returns the result inside a default completion handler.\r\n\r\n","created_at":"2016-02-11T15:59:03Z","updated_at":"2016-02-11T15:59:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/danthorpe/Operations/milestones/20","html_url":"https://github.com/danthorpe/Operations/milestones/2.6","labels_url":"https://api.github.com/repos/danthorpe/Operations/milestones/20/labels","id":1466540,"number":20,"title":"2.6","description":"","creator":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":16,"state":"open","created_at":"2015-12-18T11:56:03Z","updated_at":"2016-02-09T07:05:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/danthorpe/Operations/pulls/170/commits","review_comments_url":"https://api.github.com/repos/danthorpe/Operations/pulls/170/comments","review_comment_url":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danthorpe/Operations/issues/170/comments","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/afb30099599927ad1c6c1599c8ec0a2dc79ba3ba","head":{"label":"danthorpe:feature/OPR-170_cloud_kit_result_type","ref":"feature/OPR-170_cloud_kit_result_type","sha":"afb30099599927ad1c6c1599c8ec0a2dc79ba3ba","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"repo":{"id":38116404,"name":"Operations","full_name":"danthorpe/Operations","owner":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danthorpe/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":false,"url":"https://api.github.com/repos/danthorpe/Operations","forks_url":"https://api.github.com/repos/danthorpe/Operations/forks","keys_url":"https://api.github.com/repos/danthorpe/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danthorpe/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danthorpe/Operations/teams","hooks_url":"https://api.github.com/repos/danthorpe/Operations/hooks","issue_events_url":"https://api.github.com/repos/danthorpe/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/danthorpe/Operations/events","assignees_url":"https://api.github.com/repos/danthorpe/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/danthorpe/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/danthorpe/Operations/tags","blobs_url":"https://api.github.com/repos/danthorpe/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danthorpe/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danthorpe/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/danthorpe/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/danthorpe/Operations/languages","stargazers_url":"https://api.github.com/repos/danthorpe/Operations/stargazers","contributors_url":"https://api.github.com/repos/danthorpe/Operations/contributors","subscribers_url":"https://api.github.com/repos/danthorpe/Operations/subscribers","subscription_url":"https://api.github.com/repos/danthorpe/Operations/subscription","commits_url":"https://api.github.com/repos/danthorpe/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/danthorpe/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/danthorpe/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/danthorpe/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/danthorpe/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/danthorpe/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danthorpe/Operations/merges","archive_url":"https://api.github.com/repos/danthorpe/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danthorpe/Operations/downloads","issues_url":"https://api.github.com/repos/danthorpe/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/danthorpe/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/danthorpe/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/danthorpe/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danthorpe/Operations/labels{/name}","releases_url":"https://api.github.com/repos/danthorpe/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/danthorpe/Operations/deployments","created_at":"2015-06-26T14:44:38Z","updated_at":"2016-02-11T10:42:16Z","pushed_at":"2016-02-11T15:58:16Z","git_url":"git://github.com/danthorpe/Operations.git","ssh_url":"git@github.com:danthorpe/Operations.git","clone_url":"https://github.com/danthorpe/Operations.git","svn_url":"https://github.com/danthorpe/Operations","homepage":"","size":2980,"stargazers_count":161,"watchers_count":161,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":13,"forks":16,"open_issues":13,"watchers":161,"default_branch":"development"}},"base":{"label":"danthorpe:development","ref":"development","sha":"700f0361cd915b1542be0ef445e8894f3fe97010","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"repo":{"id":38116404,"name":"Operations","full_name":"danthorpe/Operations","owner":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danthorpe/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":false,"url":"https://api.github.com/repos/danthorpe/Operations","forks_url":"https://api.github.com/repos/danthorpe/Operations/forks","keys_url":"https://api.github.com/repos/danthorpe/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danthorpe/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danthorpe/Operations/teams","hooks_url":"https://api.github.com/repos/danthorpe/Operations/hooks","issue_events_url":"https://api.github.com/repos/danthorpe/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/danthorpe/Operations/events","assignees_url":"https://api.github.com/repos/danthorpe/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/danthorpe/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/danthorpe/Operations/tags","blobs_url":"https://api.github.com/repos/danthorpe/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danthorpe/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danthorpe/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/danthorpe/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/danthorpe/Operations/languages","stargazers_url":"https://api.github.com/repos/danthorpe/Operations/stargazers","contributors_url":"https://api.github.com/repos/danthorpe/Operations/contributors","subscribers_url":"https://api.github.com/repos/danthorpe/Operations/subscribers","subscription_url":"https://api.github.com/repos/danthorpe/Operations/subscription","commits_url":"https://api.github.com/repos/danthorpe/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/danthorpe/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/danthorpe/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/danthorpe/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/danthorpe/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/danthorpe/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danthorpe/Operations/merges","archive_url":"https://api.github.com/repos/danthorpe/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danthorpe/Operations/downloads","issues_url":"https://api.github.com/repos/danthorpe/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/danthorpe/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/danthorpe/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/danthorpe/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danthorpe/Operations/labels{/name}","releases_url":"https://api.github.com/repos/danthorpe/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/danthorpe/Operations/deployments","created_at":"2015-06-26T14:44:38Z","updated_at":"2016-02-11T10:42:16Z","pushed_at":"2016-02-11T15:58:16Z","git_url":"git://github.com/danthorpe/Operations.git","ssh_url":"git@github.com:danthorpe/Operations.git","clone_url":"https://github.com/danthorpe/Operations.git","svn_url":"https://github.com/danthorpe/Operations","homepage":"","size":2980,"stargazers_count":161,"watchers_count":161,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":13,"forks":16,"open_issues":13,"watchers":161,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/170"},"html":{"href":"https://github.com/danthorpe/Operations/pull/170"},"issue":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/170"},"comments":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/danthorpe/Operations/statuses/afb30099599927ad1c6c1599c8ec0a2dc79ba3ba"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":43,"deletions":13,"changed_files":1}}