{"action":"created","comment":{"url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/comments/204069979","pull_request_review_id":139088907,"id":204069979,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDA2OTk3OQ==","diff_hunk":"@@ -100,14 +144,46 @@ private function handleResponses(array $responses)\n             array_unshift($args, $responses);\n             $result = call_user_func_array($this->parseResponseCallable, $args);\n         } catch (MultiParseException $e) {\n-            $url = $this->requestUrls[$e->getResponseKey()] ?? $this->requestUrl;\n+            $url = $this->requestUrls[$e->getResponseKey()] ?? reset($this->requestUrls);","path":"src/ExternalApi/Client/HttpApiMultiClient.php","position":86,"original_position":86,"commit_id":"39483e479bf2415092e0c931f9d860cc2b0cc054","original_commit_id":"39483e479bf2415092e0c931f9d860cc2b0cc054","user":{"login":"Tasiobg","id":8057197,"node_id":"MDQ6VXNlcjgwNTcxOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/8057197?v=4","gravatar_id":"","url":"https://api.github.com/users/Tasiobg","html_url":"https://github.com/Tasiobg","followers_url":"https://api.github.com/users/Tasiobg/followers","following_url":"https://api.github.com/users/Tasiobg/following{/other_user}","gists_url":"https://api.github.com/users/Tasiobg/gists{/gist_id}","starred_url":"https://api.github.com/users/Tasiobg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tasiobg/subscriptions","organizations_url":"https://api.github.com/users/Tasiobg/orgs","repos_url":"https://api.github.com/users/Tasiobg/repos","events_url":"https://api.github.com/users/Tasiobg/events{/privacy}","received_events_url":"https://api.github.com/users/Tasiobg/received_events","type":"User","site_admin":false},"body":"`$e->getResponseKey()` should always return the URL but if for any reason it doesn't (bad implementation for example) at least we would be able to log something.\r\nExample of a rare case when this could happen: our code throws MultiParseException with the $key value '0' but the real key is an interger, in this case we are able to log something. We could even log different messages if the array key doesn't exist but the chances of this happenign are low enough to be worried for a more advance solution","created_at":"2018-07-20T14:49:42Z","updated_at":"2018-07-20T14:49:42Z","html_url":"https://github.com/bbc/programmes-frontend/pull/666#discussion_r204069979","pull_request_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/comments/204069979"},"html":{"href":"https://github.com/bbc/programmes-frontend/pull/666#discussion_r204069979"},"pull_request":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666"}},"in_reply_to_id":204062839},"pull_request":{"url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666","id":202865159,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyODY1MTU5","html_url":"https://github.com/bbc/programmes-frontend/pull/666","diff_url":"https://github.com/bbc/programmes-frontend/pull/666.diff","patch_url":"https://github.com/bbc/programmes-frontend/pull/666.patch","issue_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/666","number":666,"state":"open","locked":false,"title":"PROGRAMMES-6465 Update all HTTP APIs ","user":{"login":"Tasiobg","id":8057197,"node_id":"MDQ6VXNlcjgwNTcxOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/8057197?v=4","gravatar_id":"","url":"https://api.github.com/users/Tasiobg","html_url":"https://github.com/Tasiobg","followers_url":"https://api.github.com/users/Tasiobg/followers","following_url":"https://api.github.com/users/Tasiobg/following{/other_user}","gists_url":"https://api.github.com/users/Tasiobg/gists{/gist_id}","starred_url":"https://api.github.com/users/Tasiobg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tasiobg/subscriptions","organizations_url":"https://api.github.com/users/Tasiobg/orgs","repos_url":"https://api.github.com/users/Tasiobg/repos","events_url":"https://api.github.com/users/Tasiobg/events{/privacy}","received_events_url":"https://api.github.com/users/Tasiobg/received_events","type":"User","site_admin":false},"body":"Update all HTTP APIs to use the Multi client and retire the single URL HttpApiClient\r\n\r\nThis is the last PR for this branch, all APIs has been migrated to HttpApiMultiClient and HttpApiClient has been removed. Understanding this PR could be a bit challenging so feel free to ask me and I can walk you through\r\n\r\nChanges:\r\n- Updated Ada API to use HttpApiMultiClient\r\n- Fix some return type declarations\r\n- Removed HttpApiClient so now we only have one client for HTTP request\r\n- Updated guzzle to enable verifications, this fix an issue we have with TUPAC and provides more security like preventing preventing man in the middle attacks\r\n- Added more unitest to HttpApiMultiClientTest","created_at":"2018-07-20T14:25:50Z","updated_at":"2018-07-20T14:49:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3332b8073864fdbf76e614a295d02a5f4cb158b2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666/commits","review_comments_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666/comments","review_comment_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/666/comments","statuses_url":"https://api.github.com/repos/bbc/programmes-frontend/statuses/39483e479bf2415092e0c931f9d860cc2b0cc054","head":{"label":"bbc:PROGRAMMES-6465-multi-client-apis","ref":"PROGRAMMES-6465-multi-client-apis","sha":"39483e479bf2415092e0c931f9d860cc2b0cc054","user":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"repo":{"id":85298889,"node_id":"MDEwOlJlcG9zaXRvcnk4NTI5ODg4OQ==","name":"programmes-frontend","full_name":"bbc/programmes-frontend","owner":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bbc/programmes-frontend","description":"The new frontend for bbc.co.uk/programmes","fork":false,"url":"https://api.github.com/repos/bbc/programmes-frontend","forks_url":"https://api.github.com/repos/bbc/programmes-frontend/forks","keys_url":"https://api.github.com/repos/bbc/programmes-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbc/programmes-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbc/programmes-frontend/teams","hooks_url":"https://api.github.com/repos/bbc/programmes-frontend/hooks","issue_events_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/bbc/programmes-frontend/events","assignees_url":"https://api.github.com/repos/bbc/programmes-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/bbc/programmes-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/bbc/programmes-frontend/tags","blobs_url":"https://api.github.com/repos/bbc/programmes-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbc/programmes-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbc/programmes-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbc/programmes-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbc/programmes-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/bbc/programmes-frontend/languages","stargazers_url":"https://api.github.com/repos/bbc/programmes-frontend/stargazers","contributors_url":"https://api.github.com/repos/bbc/programmes-frontend/contributors","subscribers_url":"https://api.github.com/repos/bbc/programmes-frontend/subscribers","subscription_url":"https://api.github.com/repos/bbc/programmes-frontend/subscription","commits_url":"https://api.github.com/repos/bbc/programmes-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbc/programmes-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbc/programmes-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbc/programmes-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/bbc/programmes-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbc/programmes-frontend/merges","archive_url":"https://api.github.com/repos/bbc/programmes-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbc/programmes-frontend/downloads","issues_url":"https://api.github.com/repos/bbc/programmes-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/bbc/programmes-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/bbc/programmes-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbc/programmes-frontend/labels{/name}","releases_url":"https://api.github.com/repos/bbc/programmes-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/bbc/programmes-frontend/deployments","created_at":"2017-03-17T10:19:20Z","updated_at":"2018-07-20T10:02:35Z","pushed_at":"2018-07-20T14:25:51Z","git_url":"git://github.com/bbc/programmes-frontend.git","ssh_url":"git@github.com:bbc/programmes-frontend.git","clone_url":"https://github.com/bbc/programmes-frontend.git","svn_url":"https://github.com/bbc/programmes-frontend","homepage":"","size":3498,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":3,"watchers":17,"default_branch":"develop"}},"base":{"label":"bbc:develop","ref":"develop","sha":"bff5bbe085c1c40d8128b096de6720775d8e0a85","user":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"repo":{"id":85298889,"node_id":"MDEwOlJlcG9zaXRvcnk4NTI5ODg4OQ==","name":"programmes-frontend","full_name":"bbc/programmes-frontend","owner":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bbc/programmes-frontend","description":"The new frontend for bbc.co.uk/programmes","fork":false,"url":"https://api.github.com/repos/bbc/programmes-frontend","forks_url":"https://api.github.com/repos/bbc/programmes-frontend/forks","keys_url":"https://api.github.com/repos/bbc/programmes-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbc/programmes-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbc/programmes-frontend/teams","hooks_url":"https://api.github.com/repos/bbc/programmes-frontend/hooks","issue_events_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/bbc/programmes-frontend/events","assignees_url":"https://api.github.com/repos/bbc/programmes-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/bbc/programmes-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/bbc/programmes-frontend/tags","blobs_url":"https://api.github.com/repos/bbc/programmes-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbc/programmes-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbc/programmes-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbc/programmes-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbc/programmes-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/bbc/programmes-frontend/languages","stargazers_url":"https://api.github.com/repos/bbc/programmes-frontend/stargazers","contributors_url":"https://api.github.com/repos/bbc/programmes-frontend/contributors","subscribers_url":"https://api.github.com/repos/bbc/programmes-frontend/subscribers","subscription_url":"https://api.github.com/repos/bbc/programmes-frontend/subscription","commits_url":"https://api.github.com/repos/bbc/programmes-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbc/programmes-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbc/programmes-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbc/programmes-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbc/programmes-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/bbc/programmes-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbc/programmes-frontend/merges","archive_url":"https://api.github.com/repos/bbc/programmes-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbc/programmes-frontend/downloads","issues_url":"https://api.github.com/repos/bbc/programmes-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/bbc/programmes-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/bbc/programmes-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/bbc/programmes-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbc/programmes-frontend/labels{/name}","releases_url":"https://api.github.com/repos/bbc/programmes-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/bbc/programmes-frontend/deployments","created_at":"2017-03-17T10:19:20Z","updated_at":"2018-07-20T10:02:35Z","pushed_at":"2018-07-20T14:25:51Z","git_url":"git://github.com/bbc/programmes-frontend.git","ssh_url":"git@github.com:bbc/programmes-frontend.git","clone_url":"https://github.com/bbc/programmes-frontend.git","svn_url":"https://github.com/bbc/programmes-frontend","homepage":"","size":3498,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":3,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666"},"html":{"href":"https://github.com/bbc/programmes-frontend/pull/666"},"issue":{"href":"https://api.github.com/repos/bbc/programmes-frontend/issues/666"},"comments":{"href":"https://api.github.com/repos/bbc/programmes-frontend/issues/666/comments"},"review_comments":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666/comments"},"review_comment":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbc/programmes-frontend/pulls/666/commits"},"statuses":{"href":"https://api.github.com/repos/bbc/programmes-frontend/statuses/39483e479bf2415092e0c931f9d860cc2b0cc054"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Tasiobg"}}