{"action":"created","comment":{"url":"https://api.github.com/repos/DragonBox/uplift/pulls/comments/170650352","pull_request_review_id":99368301,"id":170650352,"diff_hunk":"@@ -74,31 +74,41 @@ public override Upset[] ListPackages()\n \n             List<Upset> upsetList = new List<Upset>();\n             EditorUtility.DisplayProgressBar(progressBarTitle, \"Please wait a little bit while Uplift parses the Upset in the GitHub repository at \" + urlField, 0f);\n+\n             string assetPath;\n             foreach (GitHubAsset asset in upsetAssets)\n             {\n-                StrictXmlDeserializer<Upset> deserializer = new StrictXmlDeserializer<Upset>();\n-                \n-                EditorUtility.DisplayProgressBar(\n-                    progressBarTitle,\n-                    \"Parsing \" + asset.name, \n-                    (float)(index++) / upsetAssets.Length\n-                );\n-\n-                if (!TryGetCachedItem(asset.name, out assetPath))\n+                try\n                 {\n-                    using (StreamReader sr = new StreamReader(GitHub.GetAssetStream(asset, GetToken())))\n-                    using (FileStream fs = new FileStream(assetPath, FileMode.Create))\n+                    StrictXmlDeserializer<Upset> deserializer = new StrictXmlDeserializer<Upset>();\n+\n+                    EditorUtility.DisplayProgressBar(\n+                        progressBarTitle,\n+                        \"Parsing \" + asset.name,\n+                        (float)(index++) / upsetAssets.Length\n+                    );\n+\n+                    if (!TryGetCachedItem(asset.name, out assetPath))\n                     {\n-                        sr.BaseStream.CopyTo(fs);\n+                        using (StreamReader sr = new StreamReader(GitHub.GetAssetStream(asset, GetToken())))\n+                        using (FileStream fs = new FileStream(assetPath, FileMode.Create))\n+                        {\n+                            sr.BaseStream.CopyTo(fs);\n+                        }\n                     }\n-                }\n \n-                using (FileStream fs = new FileStream(assetPath, FileMode.Open))\n+                    using (FileStream fs = new FileStream(assetPath, FileMode.Open))\n+                    {\n+                        Upset upset = deserializer.Deserialize(fs);\n+                        upset.MetaInformation.dirName = asset.name;\n+                        upsetList.Add(upset);\n+                    }\n+                }\n+                catch(Exception e)\n                 {\n-                    Upset upset = deserializer.Deserialize(fs);\n-                    upset.MetaInformation.dirName = asset.name;\n-                    upsetList.Add(upset);\n+                    Debug.LogErrorFormat(\"An error occured while trying to get asset {0} ({1}, {2}) from GithubRepository\", asset.name, asset.htmlURL, asset.apiURL);","path":"Assets/Plugins/Editor/Uplift/Schemas/Repositories/GithubRepository.cs","position":53,"original_position":53,"commit_id":"aaaaf2a2b45fc5e64a9bea6ab61032bd58ae2835","original_commit_id":"aaaaf2a2b45fc5e64a9bea6ab61032bd58ae2835","user":{"login":"lacostej","id":24282,"avatar_url":"https://avatars2.githubusercontent.com/u/24282?v=4","gravatar_id":"","url":"https://api.github.com/users/lacostej","html_url":"https://github.com/lacostej","followers_url":"https://api.github.com/users/lacostej/followers","following_url":"https://api.github.com/users/lacostej/following{/other_user}","gists_url":"https://api.github.com/users/lacostej/gists{/gist_id}","starred_url":"https://api.github.com/users/lacostej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacostej/subscriptions","organizations_url":"https://api.github.com/users/lacostej/orgs","repos_url":"https://api.github.com/users/lacostej/repos","events_url":"https://api.github.com/users/lacostej/events{/privacy}","received_events_url":"https://api.github.com/users/lacostej/received_events","type":"User","site_admin":false},"body":"shouldn't there be a `try / finally` for the ClearProgress","created_at":"2018-02-26T16:27:31Z","updated_at":"2018-02-26T16:27:32Z","html_url":"https://github.com/DragonBox/uplift/pull/50#discussion_r170650352","pull_request_url":"https://api.github.com/repos/DragonBox/uplift/pulls/50","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/comments/170650352"},"html":{"href":"https://github.com/DragonBox/uplift/pull/50#discussion_r170650352"},"pull_request":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/DragonBox/uplift/pulls/50","id":171398678,"html_url":"https://github.com/DragonBox/uplift/pull/50","diff_url":"https://github.com/DragonBox/uplift/pull/50.diff","patch_url":"https://github.com/DragonBox/uplift/pull/50.patch","issue_url":"https://api.github.com/repos/DragonBox/uplift/issues/50","number":50,"state":"open","locked":false,"title":"Cleaner failure when trying to download an asset","user":{"login":"niezbop","id":16774018,"avatar_url":"https://avatars2.githubusercontent.com/u/16774018?v=4","gravatar_id":"","url":"https://api.github.com/users/niezbop","html_url":"https://github.com/niezbop","followers_url":"https://api.github.com/users/niezbop/followers","following_url":"https://api.github.com/users/niezbop/following{/other_user}","gists_url":"https://api.github.com/users/niezbop/gists{/gist_id}","starred_url":"https://api.github.com/users/niezbop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niezbop/subscriptions","organizations_url":"https://api.github.com/users/niezbop/orgs","repos_url":"https://api.github.com/users/niezbop/repos","events_url":"https://api.github.com/users/niezbop/events{/privacy}","received_events_url":"https://api.github.com/users/niezbop/received_events","type":"User","site_admin":false},"body":"This does two things:\r\n- Close the popup window when a failure occur not to leave the ugly popup\r\n- Logs additional information","created_at":"2018-02-26T15:00:42Z","updated_at":"2018-02-26T16:27:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41f84a38ed3a3d18938e2dd98def9a62ad79279d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DragonBox/uplift/pulls/50/commits","review_comments_url":"https://api.github.com/repos/DragonBox/uplift/pulls/50/comments","review_comment_url":"https://api.github.com/repos/DragonBox/uplift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DragonBox/uplift/issues/50/comments","statuses_url":"https://api.github.com/repos/DragonBox/uplift/statuses/aaaaf2a2b45fc5e64a9bea6ab61032bd58ae2835","head":{"label":"niezbop:master","ref":"master","sha":"aaaaf2a2b45fc5e64a9bea6ab61032bd58ae2835","user":{"login":"niezbop","id":16774018,"avatar_url":"https://avatars2.githubusercontent.com/u/16774018?v=4","gravatar_id":"","url":"https://api.github.com/users/niezbop","html_url":"https://github.com/niezbop","followers_url":"https://api.github.com/users/niezbop/followers","following_url":"https://api.github.com/users/niezbop/following{/other_user}","gists_url":"https://api.github.com/users/niezbop/gists{/gist_id}","starred_url":"https://api.github.com/users/niezbop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niezbop/subscriptions","organizations_url":"https://api.github.com/users/niezbop/orgs","repos_url":"https://api.github.com/users/niezbop/repos","events_url":"https://api.github.com/users/niezbop/events{/privacy}","received_events_url":"https://api.github.com/users/niezbop/received_events","type":"User","site_admin":false},"repo":{"id":109817229,"name":"uplift","full_name":"niezbop/uplift","owner":{"login":"niezbop","id":16774018,"avatar_url":"https://avatars2.githubusercontent.com/u/16774018?v=4","gravatar_id":"","url":"https://api.github.com/users/niezbop","html_url":"https://github.com/niezbop","followers_url":"https://api.github.com/users/niezbop/followers","following_url":"https://api.github.com/users/niezbop/following{/other_user}","gists_url":"https://api.github.com/users/niezbop/gists{/gist_id}","starred_url":"https://api.github.com/users/niezbop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niezbop/subscriptions","organizations_url":"https://api.github.com/users/niezbop/orgs","repos_url":"https://api.github.com/users/niezbop/repos","events_url":"https://api.github.com/users/niezbop/events{/privacy}","received_events_url":"https://api.github.com/users/niezbop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niezbop/uplift","description":"Uplift is a package manager for the Unity game engine.","fork":true,"url":"https://api.github.com/repos/niezbop/uplift","forks_url":"https://api.github.com/repos/niezbop/uplift/forks","keys_url":"https://api.github.com/repos/niezbop/uplift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niezbop/uplift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niezbop/uplift/teams","hooks_url":"https://api.github.com/repos/niezbop/uplift/hooks","issue_events_url":"https://api.github.com/repos/niezbop/uplift/issues/events{/number}","events_url":"https://api.github.com/repos/niezbop/uplift/events","assignees_url":"https://api.github.com/repos/niezbop/uplift/assignees{/user}","branches_url":"https://api.github.com/repos/niezbop/uplift/branches{/branch}","tags_url":"https://api.github.com/repos/niezbop/uplift/tags","blobs_url":"https://api.github.com/repos/niezbop/uplift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niezbop/uplift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niezbop/uplift/git/refs{/sha}","trees_url":"https://api.github.com/repos/niezbop/uplift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niezbop/uplift/statuses/{sha}","languages_url":"https://api.github.com/repos/niezbop/uplift/languages","stargazers_url":"https://api.github.com/repos/niezbop/uplift/stargazers","contributors_url":"https://api.github.com/repos/niezbop/uplift/contributors","subscribers_url":"https://api.github.com/repos/niezbop/uplift/subscribers","subscription_url":"https://api.github.com/repos/niezbop/uplift/subscription","commits_url":"https://api.github.com/repos/niezbop/uplift/commits{/sha}","git_commits_url":"https://api.github.com/repos/niezbop/uplift/git/commits{/sha}","comments_url":"https://api.github.com/repos/niezbop/uplift/comments{/number}","issue_comment_url":"https://api.github.com/repos/niezbop/uplift/issues/comments{/number}","contents_url":"https://api.github.com/repos/niezbop/uplift/contents/{+path}","compare_url":"https://api.github.com/repos/niezbop/uplift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niezbop/uplift/merges","archive_url":"https://api.github.com/repos/niezbop/uplift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niezbop/uplift/downloads","issues_url":"https://api.github.com/repos/niezbop/uplift/issues{/number}","pulls_url":"https://api.github.com/repos/niezbop/uplift/pulls{/number}","milestones_url":"https://api.github.com/repos/niezbop/uplift/milestones{/number}","notifications_url":"https://api.github.com/repos/niezbop/uplift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niezbop/uplift/labels{/name}","releases_url":"https://api.github.com/repos/niezbop/uplift/releases{/id}","deployments_url":"https://api.github.com/repos/niezbop/uplift/deployments","created_at":"2017-11-07T09:55:14Z","updated_at":"2017-11-07T09:55:16Z","pushed_at":"2018-02-26T15:38:19Z","git_url":"git://github.com/niezbop/uplift.git","ssh_url":"git@github.com:niezbop/uplift.git","clone_url":"https://github.com/niezbop/uplift.git","svn_url":"https://github.com/niezbop/uplift","homepage":"https://dragonbox.github.io/uplift_site/","size":9500,"stargazers_count":0,"watchers_count":0,"language":"C#","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DragonBox:master","ref":"master","sha":"af85a0f9a1d23acb746b33d83048c0882de04d0b","user":{"login":"DragonBox","id":30373876,"avatar_url":"https://avatars2.githubusercontent.com/u/30373876?v=4","gravatar_id":"","url":"https://api.github.com/users/DragonBox","html_url":"https://github.com/DragonBox","followers_url":"https://api.github.com/users/DragonBox/followers","following_url":"https://api.github.com/users/DragonBox/following{/other_user}","gists_url":"https://api.github.com/users/DragonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/DragonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DragonBox/subscriptions","organizations_url":"https://api.github.com/users/DragonBox/orgs","repos_url":"https://api.github.com/users/DragonBox/repos","events_url":"https://api.github.com/users/DragonBox/events{/privacy}","received_events_url":"https://api.github.com/users/DragonBox/received_events","type":"Organization","site_admin":false},"repo":{"id":109272222,"name":"uplift","full_name":"DragonBox/uplift","owner":{"login":"DragonBox","id":30373876,"avatar_url":"https://avatars2.githubusercontent.com/u/30373876?v=4","gravatar_id":"","url":"https://api.github.com/users/DragonBox","html_url":"https://github.com/DragonBox","followers_url":"https://api.github.com/users/DragonBox/followers","following_url":"https://api.github.com/users/DragonBox/following{/other_user}","gists_url":"https://api.github.com/users/DragonBox/gists{/gist_id}","starred_url":"https://api.github.com/users/DragonBox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DragonBox/subscriptions","organizations_url":"https://api.github.com/users/DragonBox/orgs","repos_url":"https://api.github.com/users/DragonBox/repos","events_url":"https://api.github.com/users/DragonBox/events{/privacy}","received_events_url":"https://api.github.com/users/DragonBox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DragonBox/uplift","description":"Uplift is a package manager for the Unity game engine.","fork":false,"url":"https://api.github.com/repos/DragonBox/uplift","forks_url":"https://api.github.com/repos/DragonBox/uplift/forks","keys_url":"https://api.github.com/repos/DragonBox/uplift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DragonBox/uplift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DragonBox/uplift/teams","hooks_url":"https://api.github.com/repos/DragonBox/uplift/hooks","issue_events_url":"https://api.github.com/repos/DragonBox/uplift/issues/events{/number}","events_url":"https://api.github.com/repos/DragonBox/uplift/events","assignees_url":"https://api.github.com/repos/DragonBox/uplift/assignees{/user}","branches_url":"https://api.github.com/repos/DragonBox/uplift/branches{/branch}","tags_url":"https://api.github.com/repos/DragonBox/uplift/tags","blobs_url":"https://api.github.com/repos/DragonBox/uplift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DragonBox/uplift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DragonBox/uplift/git/refs{/sha}","trees_url":"https://api.github.com/repos/DragonBox/uplift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DragonBox/uplift/statuses/{sha}","languages_url":"https://api.github.com/repos/DragonBox/uplift/languages","stargazers_url":"https://api.github.com/repos/DragonBox/uplift/stargazers","contributors_url":"https://api.github.com/repos/DragonBox/uplift/contributors","subscribers_url":"https://api.github.com/repos/DragonBox/uplift/subscribers","subscription_url":"https://api.github.com/repos/DragonBox/uplift/subscription","commits_url":"https://api.github.com/repos/DragonBox/uplift/commits{/sha}","git_commits_url":"https://api.github.com/repos/DragonBox/uplift/git/commits{/sha}","comments_url":"https://api.github.com/repos/DragonBox/uplift/comments{/number}","issue_comment_url":"https://api.github.com/repos/DragonBox/uplift/issues/comments{/number}","contents_url":"https://api.github.com/repos/DragonBox/uplift/contents/{+path}","compare_url":"https://api.github.com/repos/DragonBox/uplift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DragonBox/uplift/merges","archive_url":"https://api.github.com/repos/DragonBox/uplift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DragonBox/uplift/downloads","issues_url":"https://api.github.com/repos/DragonBox/uplift/issues{/number}","pulls_url":"https://api.github.com/repos/DragonBox/uplift/pulls{/number}","milestones_url":"https://api.github.com/repos/DragonBox/uplift/milestones{/number}","notifications_url":"https://api.github.com/repos/DragonBox/uplift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DragonBox/uplift/labels{/name}","releases_url":"https://api.github.com/repos/DragonBox/uplift/releases{/id}","deployments_url":"https://api.github.com/repos/DragonBox/uplift/deployments","created_at":"2017-11-02T14:02:36Z","updated_at":"2018-01-29T19:27:23Z","pushed_at":"2018-02-26T15:44:17Z","git_url":"git://github.com/DragonBox/uplift.git","ssh_url":"git@github.com:DragonBox/uplift.git","clone_url":"https://github.com/DragonBox/uplift.git","svn_url":"https://github.com/DragonBox/uplift","homepage":"https://dragonbox.github.io/uplift_site/","size":9476,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/50"},"html":{"href":"https://github.com/DragonBox/uplift/pull/50"},"issue":{"href":"https://api.github.com/repos/DragonBox/uplift/issues/50"},"comments":{"href":"https://api.github.com/repos/DragonBox/uplift/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DragonBox/uplift/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/DragonBox/uplift/statuses/aaaaf2a2b45fc5e64a9bea6ab61032bd58ae2835"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lacostej"}}