{"action":"created","comment":{"url":"https://api.github.com/repos/shoov/shoov/pulls/comments/34651482","id":34651482,"diff_hunk":"@@ -89,4 +90,32 @@ public function complete($entity, $row) {\n     $wrapper->field_pr_screenshot_ids->set($entity->nid);\n     $wrapper->save();\n   }\n+\n+  /**\n+   * Implements MigrateDestination::prepare().\n+   *\n+   * Handle tags.\n+   *\n+   * @param $entity\n+   * @param $row\n+   */\n+  function prepare($entity, $row) {\n+    $wrapper = entity_metadata_wrapper('node', $entity);\n+\n+    // Check the vocabulary 'screenshots_tags' exist for this repository.\n+    $vocabulary_id = shoov_repository_get_vocabulary_by_repo('Screenshots tags', $wrapper->og_repo->value());\n+\n+    // If a screenshot have tags handle it.\n+    if ($row->_tags) {\n+      $tags = explode(',', $row->_tags);\n+      $tids = array();\n+      foreach($tags as $tag) {\n+        $tid = shoov_screenshot_add_tag_to_vocabulary($tag, $vocabulary_id);\n+        $tids[] = $tid;\n+      }\n+      $wrapper->og_vocabulary->set($tids);","path":"shoov/modules/custom/shoov_migrate/handlers/node/ShoovScreenshotsMigrate.php","position":37,"original_position":37,"commit_id":"366f9eeb02cea0e342c33ebc381b50cfa149abbb","original_commit_id":"366f9eeb02cea0e342c33ebc381b50cfa149abbb","user":{"login":"solker","id":10127295,"avatar_url":"https://avatars.githubusercontent.com/u/10127295?v=3","gravatar_id":"","url":"https://api.github.com/users/solker","html_url":"https://github.com/solker","followers_url":"https://api.github.com/users/solker/followers","following_url":"https://api.github.com/users/solker/following{/other_user}","gists_url":"https://api.github.com/users/solker/gists{/gist_id}","starred_url":"https://api.github.com/users/solker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solker/subscriptions","organizations_url":"https://api.github.com/users/solker/orgs","repos_url":"https://api.github.com/users/solker/repos","events_url":"https://api.github.com/users/solker/events{/privacy}","received_events_url":"https://api.github.com/users/solker/received_events","type":"User","site_admin":false},"body":"Ah, understood. Sorry. ","created_at":"2015-07-15T07:16:50Z","updated_at":"2015-07-15T07:16:50Z","html_url":"https://github.com/shoov/shoov/pull/96#discussion_r34651482","pull_request_url":"https://api.github.com/repos/shoov/shoov/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/shoov/shoov/pulls/comments/34651482"},"html":{"href":"https://github.com/shoov/shoov/pull/96#discussion_r34651482"},"pull_request":{"href":"https://api.github.com/repos/shoov/shoov/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/shoov/shoov/pulls/96","id":39761479,"html_url":"https://github.com/shoov/shoov/pull/96","diff_url":"https://github.com/shoov/shoov/pull/96.diff","patch_url":"https://github.com/shoov/shoov/pull/96.patch","issue_url":"https://api.github.com/repos/shoov/shoov/issues/96","number":96,"state":"open","locked":false,"title":"Support tags for screenshots","user":{"login":"solker","id":10127295,"avatar_url":"https://avatars.githubusercontent.com/u/10127295?v=3","gravatar_id":"","url":"https://api.github.com/users/solker","html_url":"https://github.com/solker","followers_url":"https://api.github.com/users/solker/followers","following_url":"https://api.github.com/users/solker/following{/other_user}","gists_url":"https://api.github.com/users/solker/gists{/gist_id}","starred_url":"https://api.github.com/users/solker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solker/subscriptions","organizations_url":"https://api.github.com/users/solker/orgs","repos_url":"https://api.github.com/users/solker/repos","events_url":"https://api.github.com/users/solker/events{/privacy}","received_events_url":"https://api.github.com/users/solker/received_events","type":"User","site_admin":false},"body":"Allow tagging screenshots #94","created_at":"2015-07-12T12:46:12Z","updated_at":"2015-07-15T07:16:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eff80659cc6eca46f1b62d1f95eabbba95d59053","assignee":{"login":"amitaibu","id":125707,"avatar_url":"https://avatars.githubusercontent.com/u/125707?v=3","gravatar_id":"","url":"https://api.github.com/users/amitaibu","html_url":"https://github.com/amitaibu","followers_url":"https://api.github.com/users/amitaibu/followers","following_url":"https://api.github.com/users/amitaibu/following{/other_user}","gists_url":"https://api.github.com/users/amitaibu/gists{/gist_id}","starred_url":"https://api.github.com/users/amitaibu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitaibu/subscriptions","organizations_url":"https://api.github.com/users/amitaibu/orgs","repos_url":"https://api.github.com/users/amitaibu/repos","events_url":"https://api.github.com/users/amitaibu/events{/privacy}","received_events_url":"https://api.github.com/users/amitaibu/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/shoov/shoov/pulls/96/commits","review_comments_url":"https://api.github.com/repos/shoov/shoov/pulls/96/comments","review_comment_url":"https://api.github.com/repos/shoov/shoov/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shoov/shoov/issues/96/comments","statuses_url":"https://api.github.com/repos/shoov/shoov/statuses/366f9eeb02cea0e342c33ebc381b50cfa149abbb","head":{"label":"shoov:8_screenshot_tags","ref":"8_screenshot_tags","sha":"366f9eeb02cea0e342c33ebc381b50cfa149abbb","user":{"login":"shoov","id":11602528,"avatar_url":"https://avatars.githubusercontent.com/u/11602528?v=3","gravatar_id":"","url":"https://api.github.com/users/shoov","html_url":"https://github.com/shoov","followers_url":"https://api.github.com/users/shoov/followers","following_url":"https://api.github.com/users/shoov/following{/other_user}","gists_url":"https://api.github.com/users/shoov/gists{/gist_id}","starred_url":"https://api.github.com/users/shoov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoov/subscriptions","organizations_url":"https://api.github.com/users/shoov/orgs","repos_url":"https://api.github.com/users/shoov/repos","events_url":"https://api.github.com/users/shoov/events{/privacy}","received_events_url":"https://api.github.com/users/shoov/received_events","type":"Organization","site_admin":false},"repo":{"id":30967451,"name":"shoov","full_name":"shoov/shoov","owner":{"login":"shoov","id":11602528,"avatar_url":"https://avatars.githubusercontent.com/u/11602528?v=3","gravatar_id":"","url":"https://api.github.com/users/shoov","html_url":"https://github.com/shoov","followers_url":"https://api.github.com/users/shoov/followers","following_url":"https://api.github.com/users/shoov/following{/other_user}","gists_url":"https://api.github.com/users/shoov/gists{/gist_id}","starred_url":"https://api.github.com/users/shoov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoov/subscriptions","organizations_url":"https://api.github.com/users/shoov/orgs","repos_url":"https://api.github.com/users/shoov/repos","events_url":"https://api.github.com/users/shoov/events{/privacy}","received_events_url":"https://api.github.com/users/shoov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shoov/shoov","description":"UI regression and functional testing on dev and live sites","fork":false,"url":"https://api.github.com/repos/shoov/shoov","forks_url":"https://api.github.com/repos/shoov/shoov/forks","keys_url":"https://api.github.com/repos/shoov/shoov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoov/shoov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoov/shoov/teams","hooks_url":"https://api.github.com/repos/shoov/shoov/hooks","issue_events_url":"https://api.github.com/repos/shoov/shoov/issues/events{/number}","events_url":"https://api.github.com/repos/shoov/shoov/events","assignees_url":"https://api.github.com/repos/shoov/shoov/assignees{/user}","branches_url":"https://api.github.com/repos/shoov/shoov/branches{/branch}","tags_url":"https://api.github.com/repos/shoov/shoov/tags","blobs_url":"https://api.github.com/repos/shoov/shoov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoov/shoov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoov/shoov/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoov/shoov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoov/shoov/statuses/{sha}","languages_url":"https://api.github.com/repos/shoov/shoov/languages","stargazers_url":"https://api.github.com/repos/shoov/shoov/stargazers","contributors_url":"https://api.github.com/repos/shoov/shoov/contributors","subscribers_url":"https://api.github.com/repos/shoov/shoov/subscribers","subscription_url":"https://api.github.com/repos/shoov/shoov/subscription","commits_url":"https://api.github.com/repos/shoov/shoov/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoov/shoov/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoov/shoov/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoov/shoov/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoov/shoov/contents/{+path}","compare_url":"https://api.github.com/repos/shoov/shoov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoov/shoov/merges","archive_url":"https://api.github.com/repos/shoov/shoov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoov/shoov/downloads","issues_url":"https://api.github.com/repos/shoov/shoov/issues{/number}","pulls_url":"https://api.github.com/repos/shoov/shoov/pulls{/number}","milestones_url":"https://api.github.com/repos/shoov/shoov/milestones{/number}","notifications_url":"https://api.github.com/repos/shoov/shoov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoov/shoov/labels{/name}","releases_url":"https://api.github.com/repos/shoov/shoov/releases{/id}","created_at":"2015-02-18T13:53:43Z","updated_at":"2015-07-02T19:05:13Z","pushed_at":"2015-07-15T06:40:30Z","git_url":"git://github.com/shoov/shoov.git","ssh_url":"git@github.com:shoov/shoov.git","clone_url":"https://github.com/shoov/shoov.git","svn_url":"https://github.com/shoov/shoov","homepage":"http://shoov.io","size":5553,"stargazers_count":16,"watchers_count":16,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":21,"forks":3,"open_issues":21,"watchers":16,"default_branch":"master"}},"base":{"label":"shoov:master","ref":"master","sha":"3d95b5ff85bd26677dbface3887e2381ae9cf8f6","user":{"login":"shoov","id":11602528,"avatar_url":"https://avatars.githubusercontent.com/u/11602528?v=3","gravatar_id":"","url":"https://api.github.com/users/shoov","html_url":"https://github.com/shoov","followers_url":"https://api.github.com/users/shoov/followers","following_url":"https://api.github.com/users/shoov/following{/other_user}","gists_url":"https://api.github.com/users/shoov/gists{/gist_id}","starred_url":"https://api.github.com/users/shoov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoov/subscriptions","organizations_url":"https://api.github.com/users/shoov/orgs","repos_url":"https://api.github.com/users/shoov/repos","events_url":"https://api.github.com/users/shoov/events{/privacy}","received_events_url":"https://api.github.com/users/shoov/received_events","type":"Organization","site_admin":false},"repo":{"id":30967451,"name":"shoov","full_name":"shoov/shoov","owner":{"login":"shoov","id":11602528,"avatar_url":"https://avatars.githubusercontent.com/u/11602528?v=3","gravatar_id":"","url":"https://api.github.com/users/shoov","html_url":"https://github.com/shoov","followers_url":"https://api.github.com/users/shoov/followers","following_url":"https://api.github.com/users/shoov/following{/other_user}","gists_url":"https://api.github.com/users/shoov/gists{/gist_id}","starred_url":"https://api.github.com/users/shoov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoov/subscriptions","organizations_url":"https://api.github.com/users/shoov/orgs","repos_url":"https://api.github.com/users/shoov/repos","events_url":"https://api.github.com/users/shoov/events{/privacy}","received_events_url":"https://api.github.com/users/shoov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shoov/shoov","description":"UI regression and functional testing on dev and live sites","fork":false,"url":"https://api.github.com/repos/shoov/shoov","forks_url":"https://api.github.com/repos/shoov/shoov/forks","keys_url":"https://api.github.com/repos/shoov/shoov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoov/shoov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoov/shoov/teams","hooks_url":"https://api.github.com/repos/shoov/shoov/hooks","issue_events_url":"https://api.github.com/repos/shoov/shoov/issues/events{/number}","events_url":"https://api.github.com/repos/shoov/shoov/events","assignees_url":"https://api.github.com/repos/shoov/shoov/assignees{/user}","branches_url":"https://api.github.com/repos/shoov/shoov/branches{/branch}","tags_url":"https://api.github.com/repos/shoov/shoov/tags","blobs_url":"https://api.github.com/repos/shoov/shoov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoov/shoov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoov/shoov/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoov/shoov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoov/shoov/statuses/{sha}","languages_url":"https://api.github.com/repos/shoov/shoov/languages","stargazers_url":"https://api.github.com/repos/shoov/shoov/stargazers","contributors_url":"https://api.github.com/repos/shoov/shoov/contributors","subscribers_url":"https://api.github.com/repos/shoov/shoov/subscribers","subscription_url":"https://api.github.com/repos/shoov/shoov/subscription","commits_url":"https://api.github.com/repos/shoov/shoov/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoov/shoov/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoov/shoov/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoov/shoov/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoov/shoov/contents/{+path}","compare_url":"https://api.github.com/repos/shoov/shoov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoov/shoov/merges","archive_url":"https://api.github.com/repos/shoov/shoov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoov/shoov/downloads","issues_url":"https://api.github.com/repos/shoov/shoov/issues{/number}","pulls_url":"https://api.github.com/repos/shoov/shoov/pulls{/number}","milestones_url":"https://api.github.com/repos/shoov/shoov/milestones{/number}","notifications_url":"https://api.github.com/repos/shoov/shoov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoov/shoov/labels{/name}","releases_url":"https://api.github.com/repos/shoov/shoov/releases{/id}","created_at":"2015-02-18T13:53:43Z","updated_at":"2015-07-02T19:05:13Z","pushed_at":"2015-07-15T06:40:30Z","git_url":"git://github.com/shoov/shoov.git","ssh_url":"git@github.com:shoov/shoov.git","clone_url":"https://github.com/shoov/shoov.git","svn_url":"https://github.com/shoov/shoov","homepage":"http://shoov.io","size":5553,"stargazers_count":16,"watchers_count":16,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":21,"forks":3,"open_issues":21,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shoov/shoov/pulls/96"},"html":{"href":"https://github.com/shoov/shoov/pull/96"},"issue":{"href":"https://api.github.com/repos/shoov/shoov/issues/96"},"comments":{"href":"https://api.github.com/repos/shoov/shoov/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/shoov/shoov/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/shoov/shoov/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shoov/shoov/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/shoov/shoov/statuses/366f9eeb02cea0e342c33ebc381b50cfa149abbb"}}}}