GitHub PullRequestReviewCommentEvent at 2014-07-02 21:35:59
Repository: NuGet.Services.Metadata
Actor: anurse
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/14485371","id":14485371,"diff_hunk":"@@ -0,0 +1,259 @@\n+﻿using Microsoft.SqlServer.Management.Common;\n+using Microsoft.SqlServer.Management.Smo;\n+using Newtonsoft.Json;\n+using Newtonsoft.Json.Linq;\n+using System;\n+using System.Collections.Generic;\n+using System.Data.SqlClient;\n+using System.Data.SqlTypes;\n+using System.IO;\n+using System.Net.Http;\n+using System.Threading.Tasks;\n+using System.Xml;\n+using System.Configuration;\n+\n+namespace CatalogTestTool\n+{\n+    class DataBaseGenerator\n+    {\n+        static async Task ReadCatalog(string baseAddress)\n+        {\n+            DateTime lastReadTime = DateTime.Parse(\"5/28/2014 9:04:10 PM\");//TODO: remove hardcoded lastReadTime\n+            \n+            Uri address = new Uri(string.Format(\"{0}catalog/index.json\", baseAddress));\n+            HttpClient client = new HttpClient();\n+            SqlConnection connection = null;\n+\n+            try\n+            {\n+                //connect to the miniDB \n+                string sqlConnectionString = ConfigurationManager.AppSettings[\"miniDBConnectionString\"];\n+                connection = new SqlConnection(sqlConnectionString);\n+                connection.Open();\n+            }\n+\n+            catch (SqlException sqlEx)\n+            {\n+                Console.WriteLine(sqlEx.Message);\n+            }\n+\n+            catch (System.Exception e)\n+            {\n+                Console.WriteLine(e.Message);\n+            }\n+\n+            //parse the JSON and traverse down to the individual items (packages)\n+            string indexJson = await client.GetStringAsync(address);\n+            JObject indexObj = JObject.Parse(indexJson);\n+            int count = 0;\n+            foreach (JToken indexItem in indexObj[\"item\"])\n+            {\n+                DateTime indexItemTimeStamp = indexItem[\"timeStamp\"][\"@value\"].ToObject<DateTime>();","path":"tests/CatalogValidationTool/Catalog/Catalog/DataBaseGenerator.cs","position":51,"original_position":51,"commit_id":"af8f682065bf0f25463f0423f8877352358d7fc6","original_commit_id":"af8f682065bf0f25463f0423f8877352358d7fc6","user":{"login":"anurse","id":7574,"avatar_url":"https://avatars.githubusercontent.com/u/7574?","gravatar_id":"7781336447293058f65fad13dd8513b8","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"body":"In the latest changes to the catalog, this is `indexItem[\"catalogTimeStamp\"]` (so remove the \"@value\" part and change timeStamp). Feel free to leave this in temporarily while working with whatever catalog you're testing against, just a note for something to change when the catalog is live.","created_at":"2014-07-02T21:35:59Z","updated_at":"2014-07-02T21:35:59Z","html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3#discussion_r14485371","pull_request_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/14485371"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3#discussion_r14485371"},"pull_request":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3","id":17805935,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3","diff_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3.diff","patch_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3.patch","issue_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/3","number":3,"state":"open","title":"Phase I of Catalog Validator tool. ","user":{"login":"jbagga","id":6234561,"avatar_url":"https://avatars.githubusercontent.com/u/6234561?","gravatar_id":"e676ba939caeb8a4e91350eb74e1f011","url":"https://api.github.com/users/jbagga","html_url":"https://github.com/jbagga","followers_url":"https://api.github.com/users/jbagga/followers","following_url":"https://api.github.com/users/jbagga/following{/other_user}","gists_url":"https://api.github.com/users/jbagga/gists{/gist_id}","starred_url":"https://api.github.com/users/jbagga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbagga/subscriptions","organizations_url":"https://api.github.com/users/jbagga/orgs","repos_url":"https://api.github.com/users/jbagga/repos","events_url":"https://api.github.com/users/jbagga/events{/privacy}","received_events_url":"https://api.github.com/users/jbagga/received_events","type":"User","site_admin":false},"body":"Set DatabaseGenerator as StartUp Project and set database connection strings in App.config of the same project.\r\n","created_at":"2014-07-01T00:10:59Z","updated_at":"2014-07-02T21:35:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6fa05f34eab8a81c3bc15b6fe05956aec52c91c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3/commits","review_comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3/comments","review_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/{number}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/3/comments","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/af8f682065bf0f25463f0423f8877352358d7fc6","head":{"label":"NuGet:jassCatalogTestTool","ref":"jassCatalogTestTool","sha":"af8f682065bf0f25463f0423f8877352358d7fc6","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?","gravatar_id":"d056a4aa238e6556d11a01a24013d4ad","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?","gravatar_id":"d056a4aa238e6556d11a01a24013d4ad","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments/{number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2014-06-25T18:25:04Z","pushed_at":"2014-07-02T00:15:06Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":1884,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"NuGet:master","ref":"master","sha":"a28a7fb13792065246acd90e43ecb9ca7f633866","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?","gravatar_id":"d056a4aa238e6556d11a01a24013d4ad","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?","gravatar_id":"d056a4aa238e6556d11a01a24013d4ad","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments/{number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2014-06-25T18:25:04Z","pushed_at":"2014-07-02T00:15:06Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":1884,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/3"},"issue":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/3"},"comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/af8f682065bf0f25463f0423f8877352358d7fc6"}}}}