{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/55892151","id":55892151,"diff_hunk":"@@ -329,6 +337,40 @@ public synchronized TopLevelItem createProject( TopLevelItemDescriptor type, Str\n     }\n \n     /**\n+     * Populate a {$link Categories} from a specific {$link ItemGroup}.\n+     *\n+     * @return\n+     */\n+    public static Categories getCategories(Authentication a, ItemGroup c) {\n+        Categories categories = new Categories();\n+        for (TopLevelItemDescriptor descriptor : Items.all(a, c)) {\n+            ItemCategory ic = ItemCategoryConfigurator.getCategory(descriptor);\n+            int i = 0;\n+            boolean found = false;\n+            while (i < categories.getItems().size() && !found) {\n+                if (categories.getItems().get(i).getId() == ic.getId()) {","path":"core/src/main/java/hudson/model/ItemGroupMixIn.java","position":null,"original_position":39,"commit_id":"ef5b11b7c8738689f014afbd1085bc8f71906ae7","original_commit_id":"f3b92f8a4db733c2d78f50a89fcb5f02d49637c9","user":{"login":"recena","id":1021745,"avatar_url":"https://avatars.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"body":"Absolutely!","created_at":"2016-03-11T21:36:40Z","updated_at":"2016-03-11T21:36:40Z","html_url":"https://github.com/jenkinsci/jenkins/pull/2117#discussion_r55892151","pull_request_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/55892151"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/2117#discussion_r55892151"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117","id":62558764,"html_url":"https://github.com/jenkinsci/jenkins/pull/2117","diff_url":"https://github.com/jenkinsci/jenkins/pull/2117.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/2117.patch","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2117","number":2117,"state":"open","locked":false,"title":"[JENKINS-31162] New item categorization","user":{"login":"recena","id":1021745,"avatar_url":"https://avatars.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"body":"[JENKINS-31162](https://issues.jenkins-ci.org/browse/JENKINS-31162)\r\n\r\n@reviewbybees specially @tfennelly, @rsandell ","created_at":"2016-03-11T15:30:59Z","updated_at":"2016-03-11T21:36:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e47170785394080f1251396af7fabb5381719e0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/2117/comments","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/ef5b11b7c8738689f014afbd1085bc8f71906ae7","head":{"label":"recena:JENKINS-31162","ref":"JENKINS-31162","sha":"ef5b11b7c8738689f014afbd1085bc8f71906ae7","user":{"login":"recena","id":1021745,"avatar_url":"https://avatars.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"repo":{"id":36177058,"name":"jenkins","full_name":"recena/jenkins","owner":{"login":"recena","id":1021745,"avatar_url":"https://avatars.githubusercontent.com/u/1021745?v=3","gravatar_id":"","url":"https://api.github.com/users/recena","html_url":"https://github.com/recena","followers_url":"https://api.github.com/users/recena/followers","following_url":"https://api.github.com/users/recena/following{/other_user}","gists_url":"https://api.github.com/users/recena/gists{/gist_id}","starred_url":"https://api.github.com/users/recena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/recena/subscriptions","organizations_url":"https://api.github.com/users/recena/orgs","repos_url":"https://api.github.com/users/recena/repos","events_url":"https://api.github.com/users/recena/events{/privacy}","received_events_url":"https://api.github.com/users/recena/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/recena/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/recena/jenkins","forks_url":"https://api.github.com/repos/recena/jenkins/forks","keys_url":"https://api.github.com/repos/recena/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/recena/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/recena/jenkins/teams","hooks_url":"https://api.github.com/repos/recena/jenkins/hooks","issue_events_url":"https://api.github.com/repos/recena/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/recena/jenkins/events","assignees_url":"https://api.github.com/repos/recena/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/recena/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/recena/jenkins/tags","blobs_url":"https://api.github.com/repos/recena/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/recena/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/recena/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/recena/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/recena/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/recena/jenkins/languages","stargazers_url":"https://api.github.com/repos/recena/jenkins/stargazers","contributors_url":"https://api.github.com/repos/recena/jenkins/contributors","subscribers_url":"https://api.github.com/repos/recena/jenkins/subscribers","subscription_url":"https://api.github.com/repos/recena/jenkins/subscription","commits_url":"https://api.github.com/repos/recena/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/recena/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/recena/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/recena/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/recena/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/recena/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/recena/jenkins/merges","archive_url":"https://api.github.com/repos/recena/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/recena/jenkins/downloads","issues_url":"https://api.github.com/repos/recena/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/recena/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/recena/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/recena/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/recena/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/recena/jenkins/releases{/id}","deployments_url":"https://api.github.com/repos/recena/jenkins/deployments","created_at":"2015-05-24T14:52:30Z","updated_at":"2016-02-12T18:21:41Z","pushed_at":"2016-03-11T21:35:45Z","git_url":"git://github.com/recena/jenkins.git","ssh_url":"git@github.com:recena/jenkins.git","clone_url":"https://github.com/recena/jenkins.git","svn_url":"https://github.com/recena/jenkins","homepage":"http://jenkins-ci.org/","size":90471,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"jenkinsci:2.0","ref":"2.0","sha":"25ac68ec8f6cbbf163f6c583c9e3cf3fb0a1a094","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":1103607,"name":"jenkins","full_name":"jenkinsci/jenkins","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/jenkinsci/jenkins","forks_url":"https://api.github.com/repos/jenkinsci/jenkins/forks","keys_url":"https://api.github.com/repos/jenkinsci/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/jenkins/teams","hooks_url":"https://api.github.com/repos/jenkinsci/jenkins/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/jenkins/events","assignees_url":"https://api.github.com/repos/jenkinsci/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/jenkins/tags","blobs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/jenkins/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/jenkins/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/jenkins/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/jenkins/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/jenkins/subscription","commits_url":"https://api.github.com/repos/jenkinsci/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/jenkins/merges","archive_url":"https://api.github.com/repos/jenkinsci/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/jenkins/downloads","issues_url":"https://api.github.com/repos/jenkinsci/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/jenkins/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/jenkins/deployments","created_at":"2010-11-22T21:21:23Z","updated_at":"2016-03-11T16:09:47Z","pushed_at":"2016-03-11T21:35:46Z","git_url":"git://github.com/jenkinsci/jenkins.git","ssh_url":"git@github.com:jenkinsci/jenkins.git","clone_url":"https://github.com/jenkinsci/jenkins.git","svn_url":"https://github.com/jenkinsci/jenkins","homepage":"http://jenkins-ci.org/","size":96671,"stargazers_count":5289,"watchers_count":5289,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2355,"mirror_url":null,"open_issues_count":140,"forks":2355,"open_issues":140,"watchers":5289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/2117"},"issue":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/2117"},"comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/2117/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/2117/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/jenkins/statuses/ef5b11b7c8738689f014afbd1085bc8f71906ae7"}}}}