{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/comments/44673215","id":44673215,"diff_hunk":"@@ -63,6 +64,20 @@ public static IEnumerable<BreakingChange> LoadBreakingChanges()\n             }\n         }\n \n+        private static IEnumerable<string> GetLocalAllowedCategories()\n+        {\n+            // Check to see if a file defining valid categories exists\n+            var categoriesPath = Path.Combine(GetCurrentDirectoryName(), \"BreakingChanges\", \"BreakingChangeCategories.json\");\n+            if (File.Exists(categoriesPath))\n+            {\n+                using (var categoriesFile = File.Open(categoriesPath, FileMode.Open, FileAccess.Read))\n+                {\n+                    return categoriesFile.Deserialize<string[]>();\n+                }\n+            }\n+            return null;","path":"src/Microsoft.Fx.Portability.Offline/Data.cs","position":38,"original_position":38,"commit_id":"49bc10db30febb379ff5b1fb971ad6505752e3f4","original_commit_id":"49bc10db30febb379ff5b1fb971ad6505752e3f4","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"body":"I think it's better to return null if there is no AllowedCategories file because if we pass a non-null list of allowed categories to BreakingChangeParser.FromMarkdown, then all categories used will be expected to be in that enumerable.\r\n\r\nIn other words, passing null to BreakingChangeParser.FromMarkdown will allow any categories (which I think is what we want if the file is missing) whereas passing Enumerable.Empty won't allow any categories.\r\n\r\nI suppose we could add some logic to BreakingChangeParser.FromMarkdown to understand that an empty list really means any breaking changes are allowed, but the current design felt more natural and does allow for the (probably useless) corner case of saying 'no breaking changes should have categories'.","created_at":"2015-11-12T15:50:58Z","updated_at":"2015-11-12T15:50:58Z","html_url":"https://github.com/Microsoft/dotnet-apiport/pull/189#discussion_r44673215","pull_request_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/comments/44673215"},"html":{"href":"https://github.com/Microsoft/dotnet-apiport/pull/189#discussion_r44673215"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189","id":50312572,"html_url":"https://github.com/Microsoft/dotnet-apiport/pull/189","diff_url":"https://github.com/Microsoft/dotnet-apiport/pull/189.diff","patch_url":"https://github.com/Microsoft/dotnet-apiport/pull/189.patch","issue_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/189","number":189,"state":"open","locked":false,"title":"Add a 'category' field to breaking changes","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"body":"Adds a category field to breaking changes, parses that field from markdown (if it exists) and optionally enforces that the category is valid (if valid categories are passed to the parser).\r\n\r\nAlso, updates Microsoft.Fx.Portability.Offline to pass valid categories so that breaking change categories will be validated in offline mode (online mode will require a separate change to the ApiPort service).","created_at":"2015-11-10T21:18:53Z","updated_at":"2015-11-12T15:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49a96bff6aa45555541c907c096daa7a6da18562","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189/commits","review_comments_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189/comments","review_comment_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/189/comments","statuses_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/statuses/49bc10db30febb379ff5b1fb971ad6505752e3f4","head":{"label":"mjrousos:UpdateMDFiles","ref":"UpdateMDFiles","sha":"49bc10db30febb379ff5b1fb971ad6505752e3f4","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"repo":{"id":38773695,"name":"dotnet-apiport","full_name":"mjrousos/dotnet-apiport","owner":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mjrousos/dotnet-apiport","description":"This repo contains APIPort client tools and libraries","fork":true,"url":"https://api.github.com/repos/mjrousos/dotnet-apiport","forks_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/forks","keys_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/teams","hooks_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/hooks","issue_events_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/issues/events{/number}","events_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/events","assignees_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/assignees{/user}","branches_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/branches{/branch}","tags_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/tags","blobs_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/statuses/{sha}","languages_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/languages","stargazers_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/stargazers","contributors_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/contributors","subscribers_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/subscribers","subscription_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/subscription","commits_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/contents/{+path}","compare_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/merges","archive_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/downloads","issues_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/issues{/number}","pulls_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/pulls{/number}","milestones_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/milestones{/number}","notifications_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/labels{/name}","releases_url":"https://api.github.com/repos/mjrousos/dotnet-apiport/releases{/id}","created_at":"2015-07-08T18:57:29Z","updated_at":"2015-07-08T18:57:32Z","pushed_at":"2015-11-11T16:04:46Z","git_url":"git://github.com/mjrousos/dotnet-apiport.git","ssh_url":"git@github.com:mjrousos/dotnet-apiport.git","clone_url":"https://github.com/mjrousos/dotnet-apiport.git","svn_url":"https://github.com/mjrousos/dotnet-apiport","homepage":"http://dotnetstatus.azurewebsites.net/","size":1060,"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":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"2345908e610a208ac5b25e52e51a82e2313b8b0e","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27931923,"name":"dotnet-apiport","full_name":"Microsoft/dotnet-apiport","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/dotnet-apiport","description":"This repo contains APIPort client tools and libraries","fork":false,"url":"https://api.github.com/repos/Microsoft/dotnet-apiport","forks_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/forks","keys_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/teams","hooks_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/events","assignees_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/tags","blobs_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/languages","stargazers_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/subscription","commits_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/merges","archive_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/downloads","issues_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/dotnet-apiport/releases{/id}","created_at":"2014-12-12T18:04:11Z","updated_at":"2015-11-11T09:38:10Z","pushed_at":"2015-11-11T16:04:46Z","git_url":"git://github.com/Microsoft/dotnet-apiport.git","ssh_url":"git@github.com:Microsoft/dotnet-apiport.git","clone_url":"https://github.com/Microsoft/dotnet-apiport.git","svn_url":"https://github.com/Microsoft/dotnet-apiport","homepage":"http://dotnetstatus.azurewebsites.net/","size":2562,"stargazers_count":7,"watchers_count":7,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":26,"forks":11,"open_issues":26,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189"},"html":{"href":"https://github.com/Microsoft/dotnet-apiport/pull/189"},"issue":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/189"},"comments":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/dotnet-apiport/statuses/49bc10db30febb379ff5b1fb971ad6505752e3f4"}}}}