{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/cli/pulls/comments/79688008","id":79688008,"diff_hunk":"@@ -0,0 +1,61 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using Microsoft.Build.Framework;\n+using Microsoft.Build.Utilities;\n+using System;\n+using System.IO;\n+using System.Security.Cryptography;\n+\n+namespace Microsoft.DotNet.Build.Tasks\n+{\n+    public class GenerateChecksums : Task\n+    {\n+        /// <summary>\n+        /// An item collection of files for which to generate checksums.  Each item must have metadata\n+        /// 'DestinationPath' that specifies the path of the checksum file to create.\n+        /// </summary>\n+        [Required]\n+        public ITaskItem[] Items { get; set; }\n+\n+        public override bool Execute()\n+        {\n+            foreach (ITaskItem item in Items)\n+            {\n+                try\n+                {\n+                    string destinationPath = item.GetMetadata(\"DestinationPath\");\n+                    if (string.IsNullOrEmpty(destinationPath))\n+                    {\n+                        throw new Exception($\"Metadata 'DestinationPath' is missing for item '{item.ItemSpec}'.\");\n+                    }\n+\n+                    if (!File.Exists(item.ItemSpec))\n+                    {\n+                        throw new Exception($\"The file '{item.ItemSpec}' does not exist.\");\n+                    }\n+\n+                    Log.LogMessage(MessageImportance.High, \"Generating checksum for '{0}' into '{1}'...\", item.ItemSpec, destinationPath);","path":"build_projects/dotnet-cli-build/GenerateChecksums.cs","position":39,"original_position":39,"commit_id":"22fd92a69017a6eb0ede189d368f77b4b99f86e1","original_commit_id":"22fd92a69017a6eb0ede189d368f77b4b99f86e1","user":{"login":"brthor","id":14280892,"avatar_url":"https://avatars.githubusercontent.com/u/14280892?v=3","gravatar_id":"","url":"https://api.github.com/users/brthor","html_url":"https://github.com/brthor","followers_url":"https://api.github.com/users/brthor/followers","following_url":"https://api.github.com/users/brthor/following{/other_user}","gists_url":"https://api.github.com/users/brthor/gists{/gist_id}","starred_url":"https://api.github.com/users/brthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brthor/subscriptions","organizations_url":"https://api.github.com/users/brthor/orgs","repos_url":"https://api.github.com/users/brthor/repos","events_url":"https://api.github.com/users/brthor/events{/privacy}","received_events_url":"https://api.github.com/users/brthor/received_events","type":"User","site_admin":false},"body":"It is hard to do in msbuild at times but 👍 \r\nLong lines suck to review","created_at":"2016-09-20T19:03:58Z","updated_at":"2016-09-20T19:03:58Z","html_url":"https://github.com/dotnet/cli/pull/4191#discussion_r79688008","pull_request_url":"https://api.github.com/repos/dotnet/cli/pulls/4191","_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments/79688008"},"html":{"href":"https://github.com/dotnet/cli/pull/4191#discussion_r79688008"},"pull_request":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4191"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/cli/pulls/4191","id":85611619,"html_url":"https://github.com/dotnet/cli/pull/4191","diff_url":"https://github.com/dotnet/cli/pull/4191.diff","patch_url":"https://github.com/dotnet/cli/pull/4191.patch","issue_url":"https://api.github.com/repos/dotnet/cli/issues/4191","number":4191,"state":"open","locked":false,"title":"Upload checksums for installation artifacts","user":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"body":"The checksums are SHA-512 hashes, which users can use to verify file\r\nintegrity and authenticity.\r\n\r\nFixes #3693.\r\n\r\ncc: @livarcocc @blackdwarf @MichaelSimons ","created_at":"2016-09-16T17:38:17Z","updated_at":"2016-09-20T19:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b8a82dd65d0da74441da4d0edee7a9822a0e971","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/cli/pulls/4191/commits","review_comments_url":"https://api.github.com/repos/dotnet/cli/pulls/4191/comments","review_comment_url":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/4191/comments","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/22fd92a69017a6eb0ede189d368f77b4b99f86e1","head":{"label":"naamunds:UploadChecksums","ref":"UploadChecksums","sha":"22fd92a69017a6eb0ede189d368f77b4b99f86e1","user":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"repo":{"id":53079214,"name":"cli","full_name":"naamunds/cli","owner":{"login":"naamunds","id":8249261,"avatar_url":"https://avatars.githubusercontent.com/u/8249261?v=3","gravatar_id":"","url":"https://api.github.com/users/naamunds","html_url":"https://github.com/naamunds","followers_url":"https://api.github.com/users/naamunds/followers","following_url":"https://api.github.com/users/naamunds/following{/other_user}","gists_url":"https://api.github.com/users/naamunds/gists{/gist_id}","starred_url":"https://api.github.com/users/naamunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naamunds/subscriptions","organizations_url":"https://api.github.com/users/naamunds/orgs","repos_url":"https://api.github.com/users/naamunds/repos","events_url":"https://api.github.com/users/naamunds/events{/privacy}","received_events_url":"https://api.github.com/users/naamunds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/naamunds/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":true,"url":"https://api.github.com/repos/naamunds/cli","forks_url":"https://api.github.com/repos/naamunds/cli/forks","keys_url":"https://api.github.com/repos/naamunds/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/naamunds/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/naamunds/cli/teams","hooks_url":"https://api.github.com/repos/naamunds/cli/hooks","issue_events_url":"https://api.github.com/repos/naamunds/cli/issues/events{/number}","events_url":"https://api.github.com/repos/naamunds/cli/events","assignees_url":"https://api.github.com/repos/naamunds/cli/assignees{/user}","branches_url":"https://api.github.com/repos/naamunds/cli/branches{/branch}","tags_url":"https://api.github.com/repos/naamunds/cli/tags","blobs_url":"https://api.github.com/repos/naamunds/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/naamunds/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/naamunds/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/naamunds/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/naamunds/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/naamunds/cli/languages","stargazers_url":"https://api.github.com/repos/naamunds/cli/stargazers","contributors_url":"https://api.github.com/repos/naamunds/cli/contributors","subscribers_url":"https://api.github.com/repos/naamunds/cli/subscribers","subscription_url":"https://api.github.com/repos/naamunds/cli/subscription","commits_url":"https://api.github.com/repos/naamunds/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/naamunds/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/naamunds/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/naamunds/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/naamunds/cli/contents/{+path}","compare_url":"https://api.github.com/repos/naamunds/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/naamunds/cli/merges","archive_url":"https://api.github.com/repos/naamunds/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/naamunds/cli/downloads","issues_url":"https://api.github.com/repos/naamunds/cli/issues{/number}","pulls_url":"https://api.github.com/repos/naamunds/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/naamunds/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/naamunds/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/naamunds/cli/labels{/name}","releases_url":"https://api.github.com/repos/naamunds/cli/releases{/id}","deployments_url":"https://api.github.com/repos/naamunds/cli/deployments","created_at":"2016-03-03T20:01:03Z","updated_at":"2016-03-03T20:01:10Z","pushed_at":"2016-09-16T17:32:10Z","git_url":"git://github.com/naamunds/cli.git","ssh_url":"git@github.com:naamunds/cli.git","clone_url":"https://github.com/naamunds/cli.git","svn_url":"https://github.com/naamunds/cli","homepage":"http://dotnet.github.io/","size":22987,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"rel/1.0.0"}},"base":{"label":"dotnet:rel/1.0.0","ref":"rel/1.0.0","sha":"4400b3be4a7e50a4f9d1f1200ecaa87631952215","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":43568107,"name":"cli","full_name":"dotnet/cli","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":false,"url":"https://api.github.com/repos/dotnet/cli","forks_url":"https://api.github.com/repos/dotnet/cli/forks","keys_url":"https://api.github.com/repos/dotnet/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/cli/teams","hooks_url":"https://api.github.com/repos/dotnet/cli/hooks","issue_events_url":"https://api.github.com/repos/dotnet/cli/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/cli/events","assignees_url":"https://api.github.com/repos/dotnet/cli/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/cli/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/cli/tags","blobs_url":"https://api.github.com/repos/dotnet/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/cli/languages","stargazers_url":"https://api.github.com/repos/dotnet/cli/stargazers","contributors_url":"https://api.github.com/repos/dotnet/cli/contributors","subscribers_url":"https://api.github.com/repos/dotnet/cli/subscribers","subscription_url":"https://api.github.com/repos/dotnet/cli/subscription","commits_url":"https://api.github.com/repos/dotnet/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/cli/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/cli/merges","archive_url":"https://api.github.com/repos/dotnet/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/cli/downloads","issues_url":"https://api.github.com/repos/dotnet/cli/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/cli/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/cli/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/cli/deployments","created_at":"2015-10-02T18:03:15Z","updated_at":"2016-09-20T18:51:26Z","pushed_at":"2016-09-19T23:01:06Z","git_url":"git://github.com/dotnet/cli.git","ssh_url":"git@github.com:dotnet/cli.git","clone_url":"https://github.com/dotnet/cli.git","svn_url":"https://github.com/dotnet/cli","homepage":"https://docs.microsoft.com/dotnet/ ","size":119742,"stargazers_count":1431,"watchers_count":1431,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":359,"mirror_url":null,"open_issues_count":737,"forks":359,"open_issues":737,"watchers":1431,"default_branch":"rel/1.0.0"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4191"},"html":{"href":"https://github.com/dotnet/cli/pull/4191"},"issue":{"href":"https://api.github.com/repos/dotnet/cli/issues/4191"},"comments":{"href":"https://api.github.com/repos/dotnet/cli/issues/4191/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4191/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4191/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/cli/statuses/22fd92a69017a6eb0ede189d368f77b4b99f86e1"}}}}
{"actor":{"display_login":"brthor"}}