{"action":"created","comment":{"url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/comments/56754002","id":56754002,"diff_hunk":"@@ -259,6 +264,30 @@ protected function selectVariationFromUserInput(array $variations, array $user_i\n   }\n \n   /**\n+   * Selects a product variation based on a query string.\n+   *\n+   * If there's no query string, the default variation is returned.\n+   *\n+   * @param \\Drupal\\commerce_product\\Entity\\ProductVariationInterface[] $variations\n+   *   An array of product variations.\n+   *\n+   * @return \\Drupal\\commerce_product\\Entity\\ProductVariationInterface\n+   *   The selected variation.\n+   */\n+  protected function selectVariationFromQueryString(array $variations) {\n+    // Always set the default variation.\n+    $current_variation = reset($variations);\n+    // If our query string is present and it is one of the available variations\n+    // we modify the current variation.\n+    if ($query_string_id = \\Drupal::request()->query->get('dv')) {","path":"modules/product/src/Plugin/Field/FieldWidget/ProductVariationAttributesWidget.php","position":51,"original_position":51,"commit_id":"4551c147abb910c2e44b34d91697369c4b5a5f80","original_commit_id":"4551c147abb910c2e44b34d91697369c4b5a5f80","user":{"login":"mglaman","id":3698644,"avatar_url":"https://avatars.githubusercontent.com/u/3698644?v=3","gravatar_id":"","url":"https://api.github.com/users/mglaman","html_url":"https://github.com/mglaman","followers_url":"https://api.github.com/users/mglaman/followers","following_url":"https://api.github.com/users/mglaman/following{/other_user}","gists_url":"https://api.github.com/users/mglaman/gists{/gist_id}","starred_url":"https://api.github.com/users/mglaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mglaman/subscriptions","organizations_url":"https://api.github.com/users/mglaman/orgs","repos_url":"https://api.github.com/users/mglaman/repos","events_url":"https://api.github.com/users/mglaman/events{/privacy}","received_events_url":"https://api.github.com/users/mglaman/received_events","type":"User","site_admin":false},"body":"We should inject the request, if it's not already an available property.","created_at":"2016-03-19T19:39:52Z","updated_at":"2016-03-19T19:39:52Z","html_url":"https://github.com/drupalcommerce/commerce/pull/354#discussion_r56754002","pull_request_url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354","_links":{"self":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/comments/56754002"},"html":{"href":"https://github.com/drupalcommerce/commerce/pull/354#discussion_r56754002"},"pull_request":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354"}}},"pull_request":{"url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354","id":62798075,"html_url":"https://github.com/drupalcommerce/commerce/pull/354","diff_url":"https://github.com/drupalcommerce/commerce/pull/354.diff","patch_url":"https://github.com/drupalcommerce/commerce/pull/354.patch","issue_url":"https://api.github.com/repos/drupalcommerce/commerce/issues/354","number":354,"state":"open","locked":false,"title":"2674888 change variation link","user":{"login":"haringsrob","id":866743,"avatar_url":"https://avatars.githubusercontent.com/u/866743?v=3","gravatar_id":"","url":"https://api.github.com/users/haringsrob","html_url":"https://github.com/haringsrob","followers_url":"https://api.github.com/users/haringsrob/followers","following_url":"https://api.github.com/users/haringsrob/following{/other_user}","gists_url":"https://api.github.com/users/haringsrob/gists{/gist_id}","starred_url":"https://api.github.com/users/haringsrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haringsrob/subscriptions","organizations_url":"https://api.github.com/users/haringsrob/orgs","repos_url":"https://api.github.com/users/haringsrob/repos","events_url":"https://api.github.com/users/haringsrob/events{/privacy}","received_events_url":"https://api.github.com/users/haringsrob/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-14T18:48:11Z","updated_at":"2016-03-19T19:39:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5338b562034c063b4e821dc5652177a0b6c98793","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354/commits","review_comments_url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354/comments","review_comment_url":"https://api.github.com/repos/drupalcommerce/commerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drupalcommerce/commerce/issues/354/comments","statuses_url":"https://api.github.com/repos/drupalcommerce/commerce/statuses/4551c147abb910c2e44b34d91697369c4b5a5f80","head":{"label":"haringsrob:2674888-change-variation-link","ref":"2674888-change-variation-link","sha":"4551c147abb910c2e44b34d91697369c4b5a5f80","user":{"login":"haringsrob","id":866743,"avatar_url":"https://avatars.githubusercontent.com/u/866743?v=3","gravatar_id":"","url":"https://api.github.com/users/haringsrob","html_url":"https://github.com/haringsrob","followers_url":"https://api.github.com/users/haringsrob/followers","following_url":"https://api.github.com/users/haringsrob/following{/other_user}","gists_url":"https://api.github.com/users/haringsrob/gists{/gist_id}","starred_url":"https://api.github.com/users/haringsrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haringsrob/subscriptions","organizations_url":"https://api.github.com/users/haringsrob/orgs","repos_url":"https://api.github.com/users/haringsrob/repos","events_url":"https://api.github.com/users/haringsrob/events{/privacy}","received_events_url":"https://api.github.com/users/haringsrob/received_events","type":"User","site_admin":false},"repo":{"id":50103634,"name":"commerce","full_name":"haringsrob/commerce","owner":{"login":"haringsrob","id":866743,"avatar_url":"https://avatars.githubusercontent.com/u/866743?v=3","gravatar_id":"","url":"https://api.github.com/users/haringsrob","html_url":"https://github.com/haringsrob","followers_url":"https://api.github.com/users/haringsrob/followers","following_url":"https://api.github.com/users/haringsrob/following{/other_user}","gists_url":"https://api.github.com/users/haringsrob/gists{/gist_id}","starred_url":"https://api.github.com/users/haringsrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haringsrob/subscriptions","organizations_url":"https://api.github.com/users/haringsrob/orgs","repos_url":"https://api.github.com/users/haringsrob/repos","events_url":"https://api.github.com/users/haringsrob/events{/privacy}","received_events_url":"https://api.github.com/users/haringsrob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haringsrob/commerce","description":"Commerce 2.x development","fork":true,"url":"https://api.github.com/repos/haringsrob/commerce","forks_url":"https://api.github.com/repos/haringsrob/commerce/forks","keys_url":"https://api.github.com/repos/haringsrob/commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haringsrob/commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haringsrob/commerce/teams","hooks_url":"https://api.github.com/repos/haringsrob/commerce/hooks","issue_events_url":"https://api.github.com/repos/haringsrob/commerce/issues/events{/number}","events_url":"https://api.github.com/repos/haringsrob/commerce/events","assignees_url":"https://api.github.com/repos/haringsrob/commerce/assignees{/user}","branches_url":"https://api.github.com/repos/haringsrob/commerce/branches{/branch}","tags_url":"https://api.github.com/repos/haringsrob/commerce/tags","blobs_url":"https://api.github.com/repos/haringsrob/commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haringsrob/commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haringsrob/commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/haringsrob/commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haringsrob/commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/haringsrob/commerce/languages","stargazers_url":"https://api.github.com/repos/haringsrob/commerce/stargazers","contributors_url":"https://api.github.com/repos/haringsrob/commerce/contributors","subscribers_url":"https://api.github.com/repos/haringsrob/commerce/subscribers","subscription_url":"https://api.github.com/repos/haringsrob/commerce/subscription","commits_url":"https://api.github.com/repos/haringsrob/commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/haringsrob/commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/haringsrob/commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/haringsrob/commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/haringsrob/commerce/contents/{+path}","compare_url":"https://api.github.com/repos/haringsrob/commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haringsrob/commerce/merges","archive_url":"https://api.github.com/repos/haringsrob/commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haringsrob/commerce/downloads","issues_url":"https://api.github.com/repos/haringsrob/commerce/issues{/number}","pulls_url":"https://api.github.com/repos/haringsrob/commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/haringsrob/commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/haringsrob/commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haringsrob/commerce/labels{/name}","releases_url":"https://api.github.com/repos/haringsrob/commerce/releases{/id}","deployments_url":"https://api.github.com/repos/haringsrob/commerce/deployments","created_at":"2016-01-21T11:39:45Z","updated_at":"2016-01-21T11:39:47Z","pushed_at":"2016-03-14T18:26:49Z","git_url":"git://github.com/haringsrob/commerce.git","ssh_url":"git@github.com:haringsrob/commerce.git","clone_url":"https://github.com/haringsrob/commerce.git","svn_url":"https://github.com/haringsrob/commerce","homepage":"https://drupal.org/project/commerce","size":1788,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"8.x-2.x"}},"base":{"label":"drupalcommerce:8.x-2.x","ref":"8.x-2.x","sha":"bf41aea57a89f63452e21fa7af61d15dcb53379e","user":{"login":"drupalcommerce","id":183176,"avatar_url":"https://avatars.githubusercontent.com/u/183176?v=3","gravatar_id":"","url":"https://api.github.com/users/drupalcommerce","html_url":"https://github.com/drupalcommerce","followers_url":"https://api.github.com/users/drupalcommerce/followers","following_url":"https://api.github.com/users/drupalcommerce/following{/other_user}","gists_url":"https://api.github.com/users/drupalcommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/drupalcommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupalcommerce/subscriptions","organizations_url":"https://api.github.com/users/drupalcommerce/orgs","repos_url":"https://api.github.com/users/drupalcommerce/repos","events_url":"https://api.github.com/users/drupalcommerce/events{/privacy}","received_events_url":"https://api.github.com/users/drupalcommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":21392057,"name":"commerce","full_name":"drupalcommerce/commerce","owner":{"login":"drupalcommerce","id":183176,"avatar_url":"https://avatars.githubusercontent.com/u/183176?v=3","gravatar_id":"","url":"https://api.github.com/users/drupalcommerce","html_url":"https://github.com/drupalcommerce","followers_url":"https://api.github.com/users/drupalcommerce/followers","following_url":"https://api.github.com/users/drupalcommerce/following{/other_user}","gists_url":"https://api.github.com/users/drupalcommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/drupalcommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupalcommerce/subscriptions","organizations_url":"https://api.github.com/users/drupalcommerce/orgs","repos_url":"https://api.github.com/users/drupalcommerce/repos","events_url":"https://api.github.com/users/drupalcommerce/events{/privacy}","received_events_url":"https://api.github.com/users/drupalcommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/drupalcommerce/commerce","description":"Commerce 2.x development","fork":false,"url":"https://api.github.com/repos/drupalcommerce/commerce","forks_url":"https://api.github.com/repos/drupalcommerce/commerce/forks","keys_url":"https://api.github.com/repos/drupalcommerce/commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drupalcommerce/commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drupalcommerce/commerce/teams","hooks_url":"https://api.github.com/repos/drupalcommerce/commerce/hooks","issue_events_url":"https://api.github.com/repos/drupalcommerce/commerce/issues/events{/number}","events_url":"https://api.github.com/repos/drupalcommerce/commerce/events","assignees_url":"https://api.github.com/repos/drupalcommerce/commerce/assignees{/user}","branches_url":"https://api.github.com/repos/drupalcommerce/commerce/branches{/branch}","tags_url":"https://api.github.com/repos/drupalcommerce/commerce/tags","blobs_url":"https://api.github.com/repos/drupalcommerce/commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drupalcommerce/commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drupalcommerce/commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/drupalcommerce/commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drupalcommerce/commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/drupalcommerce/commerce/languages","stargazers_url":"https://api.github.com/repos/drupalcommerce/commerce/stargazers","contributors_url":"https://api.github.com/repos/drupalcommerce/commerce/contributors","subscribers_url":"https://api.github.com/repos/drupalcommerce/commerce/subscribers","subscription_url":"https://api.github.com/repos/drupalcommerce/commerce/subscription","commits_url":"https://api.github.com/repos/drupalcommerce/commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/drupalcommerce/commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/drupalcommerce/commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/drupalcommerce/commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/drupalcommerce/commerce/contents/{+path}","compare_url":"https://api.github.com/repos/drupalcommerce/commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drupalcommerce/commerce/merges","archive_url":"https://api.github.com/repos/drupalcommerce/commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drupalcommerce/commerce/downloads","issues_url":"https://api.github.com/repos/drupalcommerce/commerce/issues{/number}","pulls_url":"https://api.github.com/repos/drupalcommerce/commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/drupalcommerce/commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/drupalcommerce/commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drupalcommerce/commerce/labels{/name}","releases_url":"https://api.github.com/repos/drupalcommerce/commerce/releases{/id}","deployments_url":"https://api.github.com/repos/drupalcommerce/commerce/deployments","created_at":"2014-07-01T15:05:51Z","updated_at":"2016-03-10T20:08:46Z","pushed_at":"2016-03-19T19:37:49Z","git_url":"git://github.com/drupalcommerce/commerce.git","ssh_url":"git@github.com:drupalcommerce/commerce.git","clone_url":"https://github.com/drupalcommerce/commerce.git","svn_url":"https://github.com/drupalcommerce/commerce","homepage":"https://drupal.org/project/commerce","size":2347,"stargazers_count":169,"watchers_count":169,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":11,"forks":87,"open_issues":11,"watchers":169,"default_branch":"8.x-2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354"},"html":{"href":"https://github.com/drupalcommerce/commerce/pull/354"},"issue":{"href":"https://api.github.com/repos/drupalcommerce/commerce/issues/354"},"comments":{"href":"https://api.github.com/repos/drupalcommerce/commerce/issues/354/comments"},"review_comments":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354/comments"},"review_comment":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drupalcommerce/commerce/pulls/354/commits"},"statuses":{"href":"https://api.github.com/repos/drupalcommerce/commerce/statuses/4551c147abb910c2e44b34d91697369c4b5a5f80"}}}}