{"action":"created","comment":{"url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/comments/170471001","pull_request_review_id":99159576,"id":170471001,"diff_hunk":"@@ -87,15 +87,21 @@ extension Alamofire.DataRequest {\n     }\n \n #if swift(>=3.2)\n-    /// Adds a handler to be called once the request has finished.\n-    public func responseDecodable<T: Decodable>(queue: DispatchQueue? = nil) -> Promise<T> {\n+    /**\n+     Returns a Promise for a DecJodable\n+     Adds a handler to be called once the request has finished.\n+     \n+     - Parameter queue: DispatchQueue, by default nil\n+     - Parameter decoder: JSONDecoder, by default JSONDecoder()\n+     */\n+    public func responseDecodable<T: Decodable>(queue: DispatchQueue? = nil, decoder: JSONDecoder = JSONDecoder()) -> Promise<T> {\n         return Promise { seal in\n             responseData(queue: queue) { response in\n                 switch response.result {\n                 case .success(let value):\n                     do {\n-                        seal.fulfill(try JSONDecoder().decode(T.self, from: value))\n-                    } catch {\n+                        seal.fulfill(try decoder.decode(T.self, from: value))\n+                    } catch let error {","path":"Sources/Alamofire+Promise.swift","position":22,"original_position":22,"commit_id":"ddf0e15793970e538722f9b20737d196f6da6c35","original_commit_id":"ddf0e15793970e538722f9b20737d196f6da6c35","user":{"login":"mxcl","id":58962,"avatar_url":"https://avatars2.githubusercontent.com/u/58962?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcl","html_url":"https://github.com/mxcl","followers_url":"https://api.github.com/users/mxcl/followers","following_url":"https://api.github.com/users/mxcl/following{/other_user}","gists_url":"https://api.github.com/users/mxcl/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcl/subscriptions","organizations_url":"https://api.github.com/users/mxcl/orgs","repos_url":"https://api.github.com/users/mxcl/repos","events_url":"https://api.github.com/users/mxcl/events{/privacy}","received_events_url":"https://api.github.com/users/mxcl/received_events","type":"User","site_admin":false},"body":"this is an unnecessary addition","created_at":"2018-02-25T22:44:01Z","updated_at":"2018-02-25T22:44:25Z","html_url":"https://github.com/PromiseKit/Alamofire-/pull/24#discussion_r170471001","pull_request_url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/comments/170471001"},"html":{"href":"https://github.com/PromiseKit/Alamofire-/pull/24#discussion_r170471001"},"pull_request":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24","id":171251988,"html_url":"https://github.com/PromiseKit/Alamofire-/pull/24","diff_url":"https://github.com/PromiseKit/Alamofire-/pull/24.diff","patch_url":"https://github.com/PromiseKit/Alamofire-/pull/24.patch","issue_url":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/24","number":24,"state":"open","locked":false,"title":"Extended responseDecodable for JSONDecoder injection","user":{"login":"timbms","id":5411131,"avatar_url":"https://avatars0.githubusercontent.com/u/5411131?v=4","gravatar_id":"","url":"https://api.github.com/users/timbms","html_url":"https://github.com/timbms","followers_url":"https://api.github.com/users/timbms/followers","following_url":"https://api.github.com/users/timbms/following{/other_user}","gists_url":"https://api.github.com/users/timbms/gists{/gist_id}","starred_url":"https://api.github.com/users/timbms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbms/subscriptions","organizations_url":"https://api.github.com/users/timbms/orgs","repos_url":"https://api.github.com/users/timbms/repos","events_url":"https://api.github.com/users/timbms/events{/privacy}","received_events_url":"https://api.github.com/users/timbms/received_events","type":"User","site_admin":false},"body":"And also added test for responseDecodable","created_at":"2018-02-25T21:18:40Z","updated_at":"2018-02-25T22:44:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adbbf0d22edf76c22bafa52481f9457ab198921b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24/commits","review_comments_url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24/comments","review_comment_url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/24/comments","statuses_url":"https://api.github.com/repos/PromiseKit/Alamofire-/statuses/ddf0e15793970e538722f9b20737d196f6da6c35","head":{"label":"timbms:master","ref":"master","sha":"ddf0e15793970e538722f9b20737d196f6da6c35","user":{"login":"timbms","id":5411131,"avatar_url":"https://avatars0.githubusercontent.com/u/5411131?v=4","gravatar_id":"","url":"https://api.github.com/users/timbms","html_url":"https://github.com/timbms","followers_url":"https://api.github.com/users/timbms/followers","following_url":"https://api.github.com/users/timbms/following{/other_user}","gists_url":"https://api.github.com/users/timbms/gists{/gist_id}","starred_url":"https://api.github.com/users/timbms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbms/subscriptions","organizations_url":"https://api.github.com/users/timbms/orgs","repos_url":"https://api.github.com/users/timbms/repos","events_url":"https://api.github.com/users/timbms/events{/privacy}","received_events_url":"https://api.github.com/users/timbms/received_events","type":"User","site_admin":false},"repo":{"id":122847911,"name":"Alamofire-","full_name":"timbms/Alamofire-","owner":{"login":"timbms","id":5411131,"avatar_url":"https://avatars0.githubusercontent.com/u/5411131?v=4","gravatar_id":"","url":"https://api.github.com/users/timbms","html_url":"https://github.com/timbms","followers_url":"https://api.github.com/users/timbms/followers","following_url":"https://api.github.com/users/timbms/following{/other_user}","gists_url":"https://api.github.com/users/timbms/gists{/gist_id}","starred_url":"https://api.github.com/users/timbms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbms/subscriptions","organizations_url":"https://api.github.com/users/timbms/orgs","repos_url":"https://api.github.com/users/timbms/repos","events_url":"https://api.github.com/users/timbms/events{/privacy}","received_events_url":"https://api.github.com/users/timbms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timbms/Alamofire-","description":"Promises for Swift & ObjC","fork":true,"url":"https://api.github.com/repos/timbms/Alamofire-","forks_url":"https://api.github.com/repos/timbms/Alamofire-/forks","keys_url":"https://api.github.com/repos/timbms/Alamofire-/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timbms/Alamofire-/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timbms/Alamofire-/teams","hooks_url":"https://api.github.com/repos/timbms/Alamofire-/hooks","issue_events_url":"https://api.github.com/repos/timbms/Alamofire-/issues/events{/number}","events_url":"https://api.github.com/repos/timbms/Alamofire-/events","assignees_url":"https://api.github.com/repos/timbms/Alamofire-/assignees{/user}","branches_url":"https://api.github.com/repos/timbms/Alamofire-/branches{/branch}","tags_url":"https://api.github.com/repos/timbms/Alamofire-/tags","blobs_url":"https://api.github.com/repos/timbms/Alamofire-/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timbms/Alamofire-/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timbms/Alamofire-/git/refs{/sha}","trees_url":"https://api.github.com/repos/timbms/Alamofire-/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timbms/Alamofire-/statuses/{sha}","languages_url":"https://api.github.com/repos/timbms/Alamofire-/languages","stargazers_url":"https://api.github.com/repos/timbms/Alamofire-/stargazers","contributors_url":"https://api.github.com/repos/timbms/Alamofire-/contributors","subscribers_url":"https://api.github.com/repos/timbms/Alamofire-/subscribers","subscription_url":"https://api.github.com/repos/timbms/Alamofire-/subscription","commits_url":"https://api.github.com/repos/timbms/Alamofire-/commits{/sha}","git_commits_url":"https://api.github.com/repos/timbms/Alamofire-/git/commits{/sha}","comments_url":"https://api.github.com/repos/timbms/Alamofire-/comments{/number}","issue_comment_url":"https://api.github.com/repos/timbms/Alamofire-/issues/comments{/number}","contents_url":"https://api.github.com/repos/timbms/Alamofire-/contents/{+path}","compare_url":"https://api.github.com/repos/timbms/Alamofire-/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timbms/Alamofire-/merges","archive_url":"https://api.github.com/repos/timbms/Alamofire-/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timbms/Alamofire-/downloads","issues_url":"https://api.github.com/repos/timbms/Alamofire-/issues{/number}","pulls_url":"https://api.github.com/repos/timbms/Alamofire-/pulls{/number}","milestones_url":"https://api.github.com/repos/timbms/Alamofire-/milestones{/number}","notifications_url":"https://api.github.com/repos/timbms/Alamofire-/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timbms/Alamofire-/labels{/name}","releases_url":"https://api.github.com/repos/timbms/Alamofire-/releases{/id}","deployments_url":"https://api.github.com/repos/timbms/Alamofire-/deployments","created_at":"2018-02-25T15:21:03Z","updated_at":"2018-02-25T15:21:05Z","pushed_at":"2018-02-25T21:16:12Z","git_url":"git://github.com/timbms/Alamofire-.git","ssh_url":"git@github.com:timbms/Alamofire-.git","clone_url":"https://github.com/timbms/Alamofire-.git","svn_url":"https://github.com/timbms/Alamofire-","homepage":"http://promisekit.org","size":28,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PromiseKit:master","ref":"master","sha":"eb05f6561eb15a78f453f008460957aab7bc0b66","user":{"login":"PromiseKit","id":11723712,"avatar_url":"https://avatars0.githubusercontent.com/u/11723712?v=4","gravatar_id":"","url":"https://api.github.com/users/PromiseKit","html_url":"https://github.com/PromiseKit","followers_url":"https://api.github.com/users/PromiseKit/followers","following_url":"https://api.github.com/users/PromiseKit/following{/other_user}","gists_url":"https://api.github.com/users/PromiseKit/gists{/gist_id}","starred_url":"https://api.github.com/users/PromiseKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PromiseKit/subscriptions","organizations_url":"https://api.github.com/users/PromiseKit/orgs","repos_url":"https://api.github.com/users/PromiseKit/repos","events_url":"https://api.github.com/users/PromiseKit/events{/privacy}","received_events_url":"https://api.github.com/users/PromiseKit/received_events","type":"Organization","site_admin":false},"repo":{"id":66160599,"name":"Alamofire-","full_name":"PromiseKit/Alamofire-","owner":{"login":"PromiseKit","id":11723712,"avatar_url":"https://avatars0.githubusercontent.com/u/11723712?v=4","gravatar_id":"","url":"https://api.github.com/users/PromiseKit","html_url":"https://github.com/PromiseKit","followers_url":"https://api.github.com/users/PromiseKit/followers","following_url":"https://api.github.com/users/PromiseKit/following{/other_user}","gists_url":"https://api.github.com/users/PromiseKit/gists{/gist_id}","starred_url":"https://api.github.com/users/PromiseKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PromiseKit/subscriptions","organizations_url":"https://api.github.com/users/PromiseKit/orgs","repos_url":"https://api.github.com/users/PromiseKit/repos","events_url":"https://api.github.com/users/PromiseKit/events{/privacy}","received_events_url":"https://api.github.com/users/PromiseKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PromiseKit/Alamofire-","description":"Promises for Swift & ObjC","fork":false,"url":"https://api.github.com/repos/PromiseKit/Alamofire-","forks_url":"https://api.github.com/repos/PromiseKit/Alamofire-/forks","keys_url":"https://api.github.com/repos/PromiseKit/Alamofire-/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PromiseKit/Alamofire-/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PromiseKit/Alamofire-/teams","hooks_url":"https://api.github.com/repos/PromiseKit/Alamofire-/hooks","issue_events_url":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/events{/number}","events_url":"https://api.github.com/repos/PromiseKit/Alamofire-/events","assignees_url":"https://api.github.com/repos/PromiseKit/Alamofire-/assignees{/user}","branches_url":"https://api.github.com/repos/PromiseKit/Alamofire-/branches{/branch}","tags_url":"https://api.github.com/repos/PromiseKit/Alamofire-/tags","blobs_url":"https://api.github.com/repos/PromiseKit/Alamofire-/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PromiseKit/Alamofire-/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PromiseKit/Alamofire-/git/refs{/sha}","trees_url":"https://api.github.com/repos/PromiseKit/Alamofire-/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PromiseKit/Alamofire-/statuses/{sha}","languages_url":"https://api.github.com/repos/PromiseKit/Alamofire-/languages","stargazers_url":"https://api.github.com/repos/PromiseKit/Alamofire-/stargazers","contributors_url":"https://api.github.com/repos/PromiseKit/Alamofire-/contributors","subscribers_url":"https://api.github.com/repos/PromiseKit/Alamofire-/subscribers","subscription_url":"https://api.github.com/repos/PromiseKit/Alamofire-/subscription","commits_url":"https://api.github.com/repos/PromiseKit/Alamofire-/commits{/sha}","git_commits_url":"https://api.github.com/repos/PromiseKit/Alamofire-/git/commits{/sha}","comments_url":"https://api.github.com/repos/PromiseKit/Alamofire-/comments{/number}","issue_comment_url":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/comments{/number}","contents_url":"https://api.github.com/repos/PromiseKit/Alamofire-/contents/{+path}","compare_url":"https://api.github.com/repos/PromiseKit/Alamofire-/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PromiseKit/Alamofire-/merges","archive_url":"https://api.github.com/repos/PromiseKit/Alamofire-/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PromiseKit/Alamofire-/downloads","issues_url":"https://api.github.com/repos/PromiseKit/Alamofire-/issues{/number}","pulls_url":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls{/number}","milestones_url":"https://api.github.com/repos/PromiseKit/Alamofire-/milestones{/number}","notifications_url":"https://api.github.com/repos/PromiseKit/Alamofire-/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PromiseKit/Alamofire-/labels{/name}","releases_url":"https://api.github.com/repos/PromiseKit/Alamofire-/releases{/id}","deployments_url":"https://api.github.com/repos/PromiseKit/Alamofire-/deployments","created_at":"2016-08-20T17:58:36Z","updated_at":"2018-02-25T20:50:59Z","pushed_at":"2018-02-25T21:18:41Z","git_url":"git://github.com/PromiseKit/Alamofire-.git","ssh_url":"git@github.com:PromiseKit/Alamofire-.git","clone_url":"https://github.com/PromiseKit/Alamofire-.git","svn_url":"https://github.com/PromiseKit/Alamofire-","homepage":"http://promisekit.org","size":26,"stargazers_count":61,"watchers_count":61,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":13,"open_issues":2,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24"},"html":{"href":"https://github.com/PromiseKit/Alamofire-/pull/24"},"issue":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/24"},"comments":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/PromiseKit/Alamofire-/statuses/ddf0e15793970e538722f9b20737d196f6da6c35"}},"author_association":"NONE"}}
{"actor":{"display_login":"mxcl"}}