{"action":"created","comment":{"url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/comments/174889608","pull_request_review_id":104319202,"id":174889608,"diff_hunk":"@@ -0,0 +1,198 @@\n+# Copyright (c) 2017 Shotgun Software Inc.\n+#\n+# CONFIDENTIAL AND PROPRIETARY\n+#\n+# This work is provided \"AS IS\" and subject to the Shotgun Pipeline Toolkit\n+# Source Code License included in this distribution package. See LICENSE.\n+# By accessing, using, copying or modifying this work you indicate your\n+# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights\n+# not expressly granted therein are reserved by Shotgun Software Inc.\n+\n+import os\n+import copy\n+import glob\n+import pprint\n+import traceback\n+\n+import sgtk\n+from sgtk import TankError\n+\n+from tank.util.shotgun import get_sg_connection\n+\n+HookBaseClass = sgtk.get_hook_baseclass()\n+\n+\n+class IngestFilesPlugin(HookBaseClass):\n+    \"\"\"\n+    Inherits from PublishFilesPlugin\n+    \"\"\"\n+\n+    @property\n+    def description(self):\n+        \"\"\"\n+        Verbose, multi-line description of what the plugin does. This can\n+        contain simple html for formatting.\n+        \"\"\"\n+\n+        desc = super(IngestFilesPlugin, self).description\n+\n+        return desc + \"<br><br>\" + \"\"\"\n+        After Ingesting the file a publishedFile gets created. The publishedFile will also be linked to a Plate entity.\n+        \"\"\"\n+\n+    def publish(self, task_settings, item):\n+        \"\"\"\n+        Executes the publish logic for the given item and task_settings.\n+\n+        :param task_settings: Dictionary of Settings. The keys are strings, matching\n+            the keys returned in the task_settings property. The values are `Setting`\n+            instances.\n+        :param item: Item to process\n+        \"\"\"\n+\n+        super(IngestFilesPlugin, self).publish(task_settings, item)\n+\n+        # create a plate entity after the publish has went through successfully.\n+        plate_entity = self._create_plate_entity(item)\n+\n+        # let's create ingest_plate_data within item properties,\n+        # so that we can link the version created to plate entity as well.\n+        item.properties[\"ingest_plate_data\"] = plate_entity\n+\n+        # link the publish file to our plate entity.\n+        self._link_published_files_to_plate_entity(plate_entity, item)","path":"hooks/tk-multi-publish2/ingest/ingest_files.py","position":63,"original_position":63,"commit_id":"9c6b917bcfc0ff7e90accf7ceb02106a5c2b32b8","original_commit_id":"9c6b917bcfc0ff7e90accf7ceb02106a5c2b32b8","user":{"login":"mbrainerd","id":13911942,"avatar_url":"https://avatars0.githubusercontent.com/u/13911942?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrainerd","html_url":"https://github.com/mbrainerd","followers_url":"https://api.github.com/users/mbrainerd/followers","following_url":"https://api.github.com/users/mbrainerd/following{/other_user}","gists_url":"https://api.github.com/users/mbrainerd/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrainerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrainerd/subscriptions","organizations_url":"https://api.github.com/users/mbrainerd/orgs","repos_url":"https://api.github.com/users/mbrainerd/repos","events_url":"https://api.github.com/users/mbrainerd/events{/privacy}","received_events_url":"https://api.github.com/users/mbrainerd/received_events","type":"User","site_admin":false},"body":"Needs exception handling.","created_at":"2018-03-15T18:38:21Z","updated_at":"2018-03-15T18:42:03Z","html_url":"https://github.com/mbrainerd/tk-config-default2/pull/14#discussion_r174889608","pull_request_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/comments/174889608"},"html":{"href":"https://github.com/mbrainerd/tk-config-default2/pull/14#discussion_r174889608"},"pull_request":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14","id":174628712,"html_url":"https://github.com/mbrainerd/tk-config-default2/pull/14","diff_url":"https://github.com/mbrainerd/tk-config-default2/pull/14.diff","patch_url":"https://github.com/mbrainerd/tk-config-default2/pull/14.patch","issue_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/14","number":14,"state":"open","locked":false,"title":"Element Ingest","user":{"login":"garvitverma","id":6881910,"avatar_url":"https://avatars0.githubusercontent.com/u/6881910?v=4","gravatar_id":"","url":"https://api.github.com/users/garvitverma","html_url":"https://github.com/garvitverma","followers_url":"https://api.github.com/users/garvitverma/followers","following_url":"https://api.github.com/users/garvitverma/following{/other_user}","gists_url":"https://api.github.com/users/garvitverma/gists{/gist_id}","starred_url":"https://api.github.com/users/garvitverma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garvitverma/subscriptions","organizations_url":"https://api.github.com/users/garvitverma/orgs","repos_url":"https://api.github.com/users/garvitverma/repos","events_url":"https://api.github.com/users/garvitverma/events{/privacy}","received_events_url":"https://api.github.com/users/garvitverma/received_events","type":"User","site_admin":false},"body":"Element Ingest.","created_at":"2018-03-13T11:20:56Z","updated_at":"2018-03-15T18:42:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"186954aaed2e9b96f4a718347c1335bc01826031","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14/commits","review_comments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14/comments","review_comment_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/14/comments","statuses_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/statuses/9c6b917bcfc0ff7e90accf7ceb02106a5c2b32b8","head":{"label":"mbrainerd:feature-436","ref":"feature-436","sha":"9c6b917bcfc0ff7e90accf7ceb02106a5c2b32b8","user":{"login":"mbrainerd","id":13911942,"avatar_url":"https://avatars0.githubusercontent.com/u/13911942?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrainerd","html_url":"https://github.com/mbrainerd","followers_url":"https://api.github.com/users/mbrainerd/followers","following_url":"https://api.github.com/users/mbrainerd/following{/other_user}","gists_url":"https://api.github.com/users/mbrainerd/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrainerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrainerd/subscriptions","organizations_url":"https://api.github.com/users/mbrainerd/orgs","repos_url":"https://api.github.com/users/mbrainerd/repos","events_url":"https://api.github.com/users/mbrainerd/events{/privacy}","received_events_url":"https://api.github.com/users/mbrainerd/received_events","type":"User","site_admin":false},"repo":{"id":112675616,"name":"tk-config-default2","full_name":"mbrainerd/tk-config-default2","owner":{"login":"mbrainerd","id":13911942,"avatar_url":"https://avatars0.githubusercontent.com/u/13911942?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrainerd","html_url":"https://github.com/mbrainerd","followers_url":"https://api.github.com/users/mbrainerd/followers","following_url":"https://api.github.com/users/mbrainerd/following{/other_user}","gists_url":"https://api.github.com/users/mbrainerd/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrainerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrainerd/subscriptions","organizations_url":"https://api.github.com/users/mbrainerd/orgs","repos_url":"https://api.github.com/users/mbrainerd/repos","events_url":"https://api.github.com/users/mbrainerd/events{/privacy}","received_events_url":"https://api.github.com/users/mbrainerd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbrainerd/tk-config-default2","description":"The second generation default configuration for Shotgun Toolkit.","fork":true,"url":"https://api.github.com/repos/mbrainerd/tk-config-default2","forks_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/forks","keys_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/teams","hooks_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/hooks","issue_events_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/events{/number}","events_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/events","assignees_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/assignees{/user}","branches_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/branches{/branch}","tags_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/tags","blobs_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/statuses/{sha}","languages_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/languages","stargazers_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/stargazers","contributors_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/contributors","subscribers_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/subscribers","subscription_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/subscription","commits_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/contents/{+path}","compare_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/merges","archive_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/downloads","issues_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues{/number}","pulls_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls{/number}","milestones_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/milestones{/number}","notifications_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/labels{/name}","releases_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/releases{/id}","deployments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/deployments","created_at":"2017-12-01T00:23:52Z","updated_at":"2018-01-30T02:47:08Z","pushed_at":"2018-03-14T08:22:59Z","git_url":"git://github.com/mbrainerd/tk-config-default2.git","ssh_url":"git@github.com:mbrainerd/tk-config-default2.git","clone_url":"https://github.com/mbrainerd/tk-config-default2.git","svn_url":"https://github.com/mbrainerd/tk-config-default2","homepage":null,"size":1563,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mbrainerd:master","ref":"master","sha":"1505510a96d0dbcd197ff68c0739b4d8495d15c2","user":{"login":"mbrainerd","id":13911942,"avatar_url":"https://avatars0.githubusercontent.com/u/13911942?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrainerd","html_url":"https://github.com/mbrainerd","followers_url":"https://api.github.com/users/mbrainerd/followers","following_url":"https://api.github.com/users/mbrainerd/following{/other_user}","gists_url":"https://api.github.com/users/mbrainerd/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrainerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrainerd/subscriptions","organizations_url":"https://api.github.com/users/mbrainerd/orgs","repos_url":"https://api.github.com/users/mbrainerd/repos","events_url":"https://api.github.com/users/mbrainerd/events{/privacy}","received_events_url":"https://api.github.com/users/mbrainerd/received_events","type":"User","site_admin":false},"repo":{"id":112675616,"name":"tk-config-default2","full_name":"mbrainerd/tk-config-default2","owner":{"login":"mbrainerd","id":13911942,"avatar_url":"https://avatars0.githubusercontent.com/u/13911942?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrainerd","html_url":"https://github.com/mbrainerd","followers_url":"https://api.github.com/users/mbrainerd/followers","following_url":"https://api.github.com/users/mbrainerd/following{/other_user}","gists_url":"https://api.github.com/users/mbrainerd/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrainerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrainerd/subscriptions","organizations_url":"https://api.github.com/users/mbrainerd/orgs","repos_url":"https://api.github.com/users/mbrainerd/repos","events_url":"https://api.github.com/users/mbrainerd/events{/privacy}","received_events_url":"https://api.github.com/users/mbrainerd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbrainerd/tk-config-default2","description":"The second generation default configuration for Shotgun Toolkit.","fork":true,"url":"https://api.github.com/repos/mbrainerd/tk-config-default2","forks_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/forks","keys_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/teams","hooks_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/hooks","issue_events_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/events{/number}","events_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/events","assignees_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/assignees{/user}","branches_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/branches{/branch}","tags_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/tags","blobs_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/statuses/{sha}","languages_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/languages","stargazers_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/stargazers","contributors_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/contributors","subscribers_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/subscribers","subscription_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/subscription","commits_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/contents/{+path}","compare_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/merges","archive_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/downloads","issues_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues{/number}","pulls_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls{/number}","milestones_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/milestones{/number}","notifications_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/labels{/name}","releases_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/releases{/id}","deployments_url":"https://api.github.com/repos/mbrainerd/tk-config-default2/deployments","created_at":"2017-12-01T00:23:52Z","updated_at":"2018-01-30T02:47:08Z","pushed_at":"2018-03-14T08:22:59Z","git_url":"git://github.com/mbrainerd/tk-config-default2.git","ssh_url":"git@github.com:mbrainerd/tk-config-default2.git","clone_url":"https://github.com/mbrainerd/tk-config-default2.git","svn_url":"https://github.com/mbrainerd/tk-config-default2","homepage":null,"size":1563,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14"},"html":{"href":"https://github.com/mbrainerd/tk-config-default2/pull/14"},"issue":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/14"},"comments":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/mbrainerd/tk-config-default2/statuses/9c6b917bcfc0ff7e90accf7ceb02106a5c2b32b8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mbrainerd"}}