{"action":"created","comment":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/comments/33947867","id":33947867,"diff_hunk":"@@ -0,0 +1,191 @@\n+package com.redhat.lightblue.hook.publish;\n+\n+import static com.redhat.lightblue.hook.publish.model.IdentitySet.INSERT_OPERATION;\n+import static com.redhat.lightblue.hook.publish.model.IdentitySet.UPDATE_OPERATION;\n+\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.Iterator;\n+import java.util.Map;\n+import java.util.Set;\n+\n+import org.json.JSONArray;\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+import org.skyscreamer.jsonassert.JSONParser;\n+\n+import com.redhat.lightblue.hook.publish.model.Identity;\n+import com.redhat.lightblue.hook.publish.model.IdentitySet;\n+import com.redhat.lightblue.hook.publish.model.JSONWrapper;\n+\n+public class IdentityExctractionUtil {\n+\n+    /*\n+     * Accepts JSONObject / JSONArray and returns the IdentitySet for the\n+     * required permutations.\n+     * \n+     * each IdentitySet implies one event","path":"src/main/java/com/redhat/lightblue/hook/publish/IdentityExctractionUtil.java","position":null,"original_position":27,"commit_id":"5a9938fe1d63b86548f0988a7e7d984cd6c439c0","original_commit_id":"fa2152c4a7da0df222be25db786aabf5f7d8ed61","user":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"body":"@paterczm done","created_at":"2015-07-06T15:40:12Z","updated_at":"2015-07-06T15:40:12Z","html_url":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13#discussion_r33947867","pull_request_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/comments/33947867"},"html":{"href":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13#discussion_r33947867"},"pull_request":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13","id":38736326,"html_url":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13","diff_url":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13.diff","patch_url":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13.patch","issue_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/13","number":13,"state":"open","locked":false,"title":"update publish hook","user":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"body":"* fire events only for changes in integrated fields\r\n* add configurations\r\n* add unit tests\r\n\r\nfixes #3 ","created_at":"2015-06-29T01:43:55Z","updated_at":"2015-07-06T15:40:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a2e1cb22b182a0f4380566e48f13b484c8dbecc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13/commits","review_comments_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13/comments","review_comment_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/13/comments","statuses_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/statuses/5a9938fe1d63b86548f0988a7e7d984cd6c439c0","head":{"label":"vritant:master","ref":"master","sha":"5a9938fe1d63b86548f0988a7e7d984cd6c439c0","user":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"repo":{"id":38221654,"name":"lightblue-publish-hook","full_name":"vritant/lightblue-publish-hook","owner":{"login":"vritant","id":2501280,"avatar_url":"https://avatars.githubusercontent.com/u/2501280?v=3","gravatar_id":"","url":"https://api.github.com/users/vritant","html_url":"https://github.com/vritant","followers_url":"https://api.github.com/users/vritant/followers","following_url":"https://api.github.com/users/vritant/following{/other_user}","gists_url":"https://api.github.com/users/vritant/gists{/gist_id}","starred_url":"https://api.github.com/users/vritant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vritant/subscriptions","organizations_url":"https://api.github.com/users/vritant/orgs","repos_url":"https://api.github.com/users/vritant/repos","events_url":"https://api.github.com/users/vritant/events{/privacy}","received_events_url":"https://api.github.com/users/vritant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vritant/lightblue-publish-hook","description":"Hook used to publish events","fork":true,"url":"https://api.github.com/repos/vritant/lightblue-publish-hook","forks_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/forks","keys_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/teams","hooks_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/hooks","issue_events_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/issues/events{/number}","events_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/events","assignees_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/assignees{/user}","branches_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/branches{/branch}","tags_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/tags","blobs_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/git/refs{/sha}","trees_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/statuses/{sha}","languages_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/languages","stargazers_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/stargazers","contributors_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/contributors","subscribers_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/subscribers","subscription_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/subscription","commits_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/commits{/sha}","git_commits_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/git/commits{/sha}","comments_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/comments{/number}","issue_comment_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/issues/comments{/number}","contents_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/contents/{+path}","compare_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/merges","archive_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/downloads","issues_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/issues{/number}","pulls_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/pulls{/number}","milestones_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/milestones{/number}","notifications_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/labels{/name}","releases_url":"https://api.github.com/repos/vritant/lightblue-publish-hook/releases{/id}","created_at":"2015-06-29T01:38:25Z","updated_at":"2015-06-29T01:38:25Z","pushed_at":"2015-07-02T20:59:59Z","git_url":"git://github.com/vritant/lightblue-publish-hook.git","ssh_url":"git@github.com:vritant/lightblue-publish-hook.git","clone_url":"https://github.com/vritant/lightblue-publish-hook.git","svn_url":"https://github.com/vritant/lightblue-publish-hook","homepage":"","size":150,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"lightblue-platform:master","ref":"master","sha":"3415a68fc868b0ecb67317ce234df8426fe007b9","user":{"login":"lightblue-platform","id":7061725,"avatar_url":"https://avatars.githubusercontent.com/u/7061725?v=3","gravatar_id":"","url":"https://api.github.com/users/lightblue-platform","html_url":"https://github.com/lightblue-platform","followers_url":"https://api.github.com/users/lightblue-platform/followers","following_url":"https://api.github.com/users/lightblue-platform/following{/other_user}","gists_url":"https://api.github.com/users/lightblue-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/lightblue-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightblue-platform/subscriptions","organizations_url":"https://api.github.com/users/lightblue-platform/orgs","repos_url":"https://api.github.com/users/lightblue-platform/repos","events_url":"https://api.github.com/users/lightblue-platform/events{/privacy}","received_events_url":"https://api.github.com/users/lightblue-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":35169271,"name":"lightblue-publish-hook","full_name":"lightblue-platform/lightblue-publish-hook","owner":{"login":"lightblue-platform","id":7061725,"avatar_url":"https://avatars.githubusercontent.com/u/7061725?v=3","gravatar_id":"","url":"https://api.github.com/users/lightblue-platform","html_url":"https://github.com/lightblue-platform","followers_url":"https://api.github.com/users/lightblue-platform/followers","following_url":"https://api.github.com/users/lightblue-platform/following{/other_user}","gists_url":"https://api.github.com/users/lightblue-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/lightblue-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightblue-platform/subscriptions","organizations_url":"https://api.github.com/users/lightblue-platform/orgs","repos_url":"https://api.github.com/users/lightblue-platform/repos","events_url":"https://api.github.com/users/lightblue-platform/events{/privacy}","received_events_url":"https://api.github.com/users/lightblue-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lightblue-platform/lightblue-publish-hook","description":"Hook used to publish events","fork":false,"url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook","forks_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/forks","keys_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/teams","hooks_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/hooks","issue_events_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/events{/number}","events_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/events","assignees_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/assignees{/user}","branches_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/branches{/branch}","tags_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/tags","blobs_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/statuses/{sha}","languages_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/languages","stargazers_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/stargazers","contributors_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/contributors","subscribers_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/subscribers","subscription_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/subscription","commits_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/contents/{+path}","compare_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/merges","archive_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/downloads","issues_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues{/number}","pulls_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls{/number}","milestones_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/milestones{/number}","notifications_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/labels{/name}","releases_url":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/releases{/id}","created_at":"2015-05-06T16:09:47Z","updated_at":"2015-05-28T20:28:20Z","pushed_at":"2015-07-02T21:00:00Z","git_url":"git://github.com/lightblue-platform/lightblue-publish-hook.git","ssh_url":"git@github.com:lightblue-platform/lightblue-publish-hook.git","clone_url":"https://github.com/lightblue-platform/lightblue-publish-hook.git","svn_url":"https://github.com/lightblue-platform/lightblue-publish-hook","homepage":"","size":309,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13"},"html":{"href":"https://github.com/lightblue-platform/lightblue-publish-hook/pull/13"},"issue":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/13"},"comments":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/lightblue-platform/lightblue-publish-hook/statuses/5a9938fe1d63b86548f0988a7e7d984cd6c439c0"}}}}