{"action":"created","comment":{"url":"https://api.github.com/repos/bblfsh/sdk/pulls/comments/228718703","pull_request_review_id":169061809,"id":228718703,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODcxODcwMw==","diff_hunk":"@@ -0,0 +1,60 @@\n+package diff\n+\n+import (\n+\t\"gopkg.in/bblfsh/sdk.v2/uast/nodes\"\n+)\n+\n+type Changelist []Change\n+\n+type Change interface {\n+\tisChange()\n+\tTransactionID() uint64\n+}\n+\n+type changeBase struct {\n+\ttxID uint64\n+}\n+\n+func (changeBase) isChange()                {}\n+func (ch changeBase) TransactionID() uint64 { return ch.txID }\n+\n+// TODO: proper ID of a node somehow\n+type ID nodes.Comparable\n+\n+// key in a node, string for nodes.Object and int for nodes.Array\n+type Key interface{ isKey() }\n+\n+type String string\n+type Int int\n+\n+func (Int) isKey()    {}\n+func (String) isKey() {}\n+\n+// four change types\n+\n+// Create a node. Each array and object is created separately.\n+type Create struct {\n+\tchangeBase\n+\tNode nodes.Node\n+}\n+\n+// delete a node by ID\n+type Delete struct {\n+\tchangeBase\n+\tNodeID ID\n+}\n+\n+// attach a node as a child of another node with a given key\n+type Attach struct {\n+\tchangeBase\n+\tParent ID\n+\tKey    Key\n+\tChild  ID\n+}\n+\n+// deattach a child from a node\n+type Deattach struct {\n+\tchangeBase\n+\tParent ID\n+\tKey    Key //or string, how to do alternative?","path":"uast/diff/changelist.go","position":59,"original_position":59,"commit_id":"f319b7fb3be5691b078eb40763ff1ac0d5cc34a9","original_commit_id":"f319b7fb3be5691b078eb40763ff1ac0d5cc34a9","user":{"login":"quinor","id":3879392,"node_id":"MDQ6VXNlcjM4NzkzOTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3879392?v=4","gravatar_id":"","url":"https://api.github.com/users/quinor","html_url":"https://github.com/quinor","followers_url":"https://api.github.com/users/quinor/followers","following_url":"https://api.github.com/users/quinor/following{/other_user}","gists_url":"https://api.github.com/users/quinor/gists{/gist_id}","starred_url":"https://api.github.com/users/quinor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinor/subscriptions","organizations_url":"https://api.github.com/users/quinor/orgs","repos_url":"https://api.github.com/users/quinor/repos","events_url":"https://api.github.com/users/quinor/events{/privacy}","received_events_url":"https://api.github.com/users/quinor/received_events","type":"User","site_admin":false},"body":"I am not sure whether deattach operation makes sense for an array. It could have semantics of making such child a null for example.","created_at":"2018-10-27T16:37:52Z","updated_at":"2018-10-27T16:37:52Z","html_url":"https://github.com/bblfsh/sdk/pull/309#discussion_r228718703","pull_request_url":"https://api.github.com/repos/bblfsh/sdk/pulls/309","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/comments/228718703"},"html":{"href":"https://github.com/bblfsh/sdk/pull/309#discussion_r228718703"},"pull_request":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/309"}},"in_reply_to_id":219868365},"pull_request":{"url":"https://api.github.com/repos/bblfsh/sdk/pulls/309","id":217242483,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MjQyNDgz","html_url":"https://github.com/bblfsh/sdk/pull/309","diff_url":"https://github.com/bblfsh/sdk/pull/309.diff","patch_url":"https://github.com/bblfsh/sdk/pull/309.patch","issue_url":"https://api.github.com/repos/bblfsh/sdk/issues/309","number":309,"state":"open","locked":false,"title":"added UAST diff algorithm","user":{"login":"quinor","id":3879392,"node_id":"MDQ6VXNlcjM4NzkzOTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3879392?v=4","gravatar_id":"","url":"https://api.github.com/users/quinor","html_url":"https://github.com/quinor","followers_url":"https://api.github.com/users/quinor/followers","following_url":"https://api.github.com/users/quinor/following{/other_user}","gists_url":"https://api.github.com/users/quinor/gists{/gist_id}","starred_url":"https://api.github.com/users/quinor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinor/subscriptions","organizations_url":"https://api.github.com/users/quinor/orgs","repos_url":"https://api.github.com/users/quinor/repos","events_url":"https://api.github.com/users/quinor/events{/privacy}","received_events_url":"https://api.github.com/users/quinor/received_events","type":"User","site_admin":false},"body":"still WIP, diffing works, applying diff not implemented yet","created_at":"2018-09-21T10:38:53Z","updated_at":"2018-10-27T16:37:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7437288f629dd0196e4b34c919cffe8b38ac2e29","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bblfsh/sdk/pulls/309/commits","review_comments_url":"https://api.github.com/repos/bblfsh/sdk/pulls/309/comments","review_comment_url":"https://api.github.com/repos/bblfsh/sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bblfsh/sdk/issues/309/comments","statuses_url":"https://api.github.com/repos/bblfsh/sdk/statuses/f319b7fb3be5691b078eb40763ff1ac0d5cc34a9","head":{"label":"quinor:master","ref":"master","sha":"f319b7fb3be5691b078eb40763ff1ac0d5cc34a9","user":{"login":"quinor","id":3879392,"node_id":"MDQ6VXNlcjM4NzkzOTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3879392?v=4","gravatar_id":"","url":"https://api.github.com/users/quinor","html_url":"https://github.com/quinor","followers_url":"https://api.github.com/users/quinor/followers","following_url":"https://api.github.com/users/quinor/following{/other_user}","gists_url":"https://api.github.com/users/quinor/gists{/gist_id}","starred_url":"https://api.github.com/users/quinor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinor/subscriptions","organizations_url":"https://api.github.com/users/quinor/orgs","repos_url":"https://api.github.com/users/quinor/repos","events_url":"https://api.github.com/users/quinor/events{/privacy}","received_events_url":"https://api.github.com/users/quinor/received_events","type":"User","site_admin":false},"repo":{"id":149747820,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk3NDc4MjA=","name":"sdk","full_name":"quinor/sdk","private":false,"owner":{"login":"quinor","id":3879392,"node_id":"MDQ6VXNlcjM4NzkzOTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3879392?v=4","gravatar_id":"","url":"https://api.github.com/users/quinor","html_url":"https://github.com/quinor","followers_url":"https://api.github.com/users/quinor/followers","following_url":"https://api.github.com/users/quinor/following{/other_user}","gists_url":"https://api.github.com/users/quinor/gists{/gist_id}","starred_url":"https://api.github.com/users/quinor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinor/subscriptions","organizations_url":"https://api.github.com/users/quinor/orgs","repos_url":"https://api.github.com/users/quinor/repos","events_url":"https://api.github.com/users/quinor/events{/privacy}","received_events_url":"https://api.github.com/users/quinor/received_events","type":"User","site_admin":false},"html_url":"https://github.com/quinor/sdk","description":"Babelfish driver SDK ","fork":true,"url":"https://api.github.com/repos/quinor/sdk","forks_url":"https://api.github.com/repos/quinor/sdk/forks","keys_url":"https://api.github.com/repos/quinor/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quinor/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quinor/sdk/teams","hooks_url":"https://api.github.com/repos/quinor/sdk/hooks","issue_events_url":"https://api.github.com/repos/quinor/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/quinor/sdk/events","assignees_url":"https://api.github.com/repos/quinor/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/quinor/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/quinor/sdk/tags","blobs_url":"https://api.github.com/repos/quinor/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quinor/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quinor/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/quinor/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quinor/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/quinor/sdk/languages","stargazers_url":"https://api.github.com/repos/quinor/sdk/stargazers","contributors_url":"https://api.github.com/repos/quinor/sdk/contributors","subscribers_url":"https://api.github.com/repos/quinor/sdk/subscribers","subscription_url":"https://api.github.com/repos/quinor/sdk/subscription","commits_url":"https://api.github.com/repos/quinor/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/quinor/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/quinor/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/quinor/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/quinor/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/quinor/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quinor/sdk/merges","archive_url":"https://api.github.com/repos/quinor/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quinor/sdk/downloads","issues_url":"https://api.github.com/repos/quinor/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/quinor/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/quinor/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/quinor/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quinor/sdk/labels{/name}","releases_url":"https://api.github.com/repos/quinor/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/quinor/sdk/deployments","created_at":"2018-09-21T10:21:26Z","updated_at":"2018-09-21T15:52:54Z","pushed_at":"2018-09-21T15:52:51Z","git_url":"git://github.com/quinor/sdk.git","ssh_url":"git@github.com:quinor/sdk.git","clone_url":"https://github.com/quinor/sdk.git","svn_url":"https://github.com/quinor/sdk","homepage":"","size":1456,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bblfsh:master","ref":"master","sha":"c99103275dccdb596901940f64fc5f34796e5452","user":{"login":"bblfsh","id":25795418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzk1NDE4","avatar_url":"https://avatars0.githubusercontent.com/u/25795418?v=4","gravatar_id":"","url":"https://api.github.com/users/bblfsh","html_url":"https://github.com/bblfsh","followers_url":"https://api.github.com/users/bblfsh/followers","following_url":"https://api.github.com/users/bblfsh/following{/other_user}","gists_url":"https://api.github.com/users/bblfsh/gists{/gist_id}","starred_url":"https://api.github.com/users/bblfsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bblfsh/subscriptions","organizations_url":"https://api.github.com/users/bblfsh/orgs","repos_url":"https://api.github.com/users/bblfsh/repos","events_url":"https://api.github.com/users/bblfsh/events{/privacy}","received_events_url":"https://api.github.com/users/bblfsh/received_events","type":"Organization","site_admin":false},"repo":{"id":82719719,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcxOTcxOQ==","name":"sdk","full_name":"bblfsh/sdk","private":false,"owner":{"login":"bblfsh","id":25795418,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzk1NDE4","avatar_url":"https://avatars0.githubusercontent.com/u/25795418?v=4","gravatar_id":"","url":"https://api.github.com/users/bblfsh","html_url":"https://github.com/bblfsh","followers_url":"https://api.github.com/users/bblfsh/followers","following_url":"https://api.github.com/users/bblfsh/following{/other_user}","gists_url":"https://api.github.com/users/bblfsh/gists{/gist_id}","starred_url":"https://api.github.com/users/bblfsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bblfsh/subscriptions","organizations_url":"https://api.github.com/users/bblfsh/orgs","repos_url":"https://api.github.com/users/bblfsh/repos","events_url":"https://api.github.com/users/bblfsh/events{/privacy}","received_events_url":"https://api.github.com/users/bblfsh/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bblfsh/sdk","description":"Babelfish driver SDK ","fork":false,"url":"https://api.github.com/repos/bblfsh/sdk","forks_url":"https://api.github.com/repos/bblfsh/sdk/forks","keys_url":"https://api.github.com/repos/bblfsh/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bblfsh/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bblfsh/sdk/teams","hooks_url":"https://api.github.com/repos/bblfsh/sdk/hooks","issue_events_url":"https://api.github.com/repos/bblfsh/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/bblfsh/sdk/events","assignees_url":"https://api.github.com/repos/bblfsh/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/bblfsh/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/bblfsh/sdk/tags","blobs_url":"https://api.github.com/repos/bblfsh/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bblfsh/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bblfsh/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/bblfsh/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bblfsh/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/bblfsh/sdk/languages","stargazers_url":"https://api.github.com/repos/bblfsh/sdk/stargazers","contributors_url":"https://api.github.com/repos/bblfsh/sdk/contributors","subscribers_url":"https://api.github.com/repos/bblfsh/sdk/subscribers","subscription_url":"https://api.github.com/repos/bblfsh/sdk/subscription","commits_url":"https://api.github.com/repos/bblfsh/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/bblfsh/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/bblfsh/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/bblfsh/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/bblfsh/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/bblfsh/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bblfsh/sdk/merges","archive_url":"https://api.github.com/repos/bblfsh/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bblfsh/sdk/downloads","issues_url":"https://api.github.com/repos/bblfsh/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/bblfsh/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/bblfsh/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/bblfsh/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bblfsh/sdk/labels{/name}","releases_url":"https://api.github.com/repos/bblfsh/sdk/releases{/id}","deployments_url":"https://api.github.com/repos/bblfsh/sdk/deployments","created_at":"2017-02-21T19:41:42Z","updated_at":"2018-10-24T13:39:04Z","pushed_at":"2018-10-26T17:53:56Z","git_url":"git://github.com/bblfsh/sdk.git","ssh_url":"git@github.com:bblfsh/sdk.git","clone_url":"https://github.com/bblfsh/sdk.git","svn_url":"https://github.com/bblfsh/sdk","homepage":"","size":1473,"stargazers_count":17,"watchers_count":17,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":18,"open_issues":15,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/309"},"html":{"href":"https://github.com/bblfsh/sdk/pull/309"},"issue":{"href":"https://api.github.com/repos/bblfsh/sdk/issues/309"},"comments":{"href":"https://api.github.com/repos/bblfsh/sdk/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bblfsh/sdk/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/bblfsh/sdk/statuses/f319b7fb3be5691b078eb40763ff1ac0d5cc34a9"}},"author_association":"NONE"}}
{"actor":{"display_login":"quinor"}}