{"action":"created","comment":{"url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/comments/205308577","pull_request_review_id":140553770,"id":205308577,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTMwODU3Nw==","diff_hunk":"@@ -57,32 +71,82 @@ export class Graph {\n     this.storage.vertices = this.storage.vertices.concat([this.vertexToWrite]);\n     return this;\n   }\n- \n+\n+  public addE(label: string, target_label: string, target_id: string): Graph {\n+    this.endReads();\n+    this.edgeToWrite = {\n+      label,\n+      source_label: (this.vertexToWrite as VertexStorage).label,\n+      source_id: (this.vertexToWrite as VertexStorage).properties[\"id\"],\n+      target_label,\n+      target_id,\n+    };\n+    this.storage.edges = this.storage.edges.concat([this.edgeToWrite]);\n+    return this;\n+  }\n+\n   public property(key: string, value: any): Graph {\n     (this.vertexToWrite as VertexStorage).properties[key] = value;\n     return this;\n   }\n- \n+\n   /* Read */\n \n   public V(): Graph {\n     this.endWrites();\n     this.verticesToRead = Object.values(this.storage.vertices);\n     return this;\n   }\n+  \n+  public E(): Graph {\n+    this.endWrites();\n+    this.edgesToRead = Object.values(this.storage.edges);\n+    return this;\n+  }\n \n   public hasLabel(label: string): Graph {\n-    this.verticesToRead = (this.verticesToRead as VertexStorage[]).filter(vertex => vertex.label === label);\n+    this.verticesToRead = (this.verticesToRead as VertexStorage[]).filter((vertex: VertexStorage) => vertex.label === label);","path":"source/index.ts","position":103,"original_position":103,"commit_id":"2bd37b4a3378f28d85fc298cf78cdd48dfe6d5b5","original_commit_id":"2bd37b4a3378f28d85fc298cf78cdd48dfe6d5b5","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Similar blocks of code found in 2 locations. Consider refactoring.","created_at":"2018-07-26T01:32:39Z","updated_at":"2018-07-26T01:32:39Z","html_url":"https://github.com/AriChivukula/foia-db/pull/23#discussion_r205308577","pull_request_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/comments/205308577"},"html":{"href":"https://github.com/AriChivukula/foia-db/pull/23#discussion_r205308577"},"pull_request":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23","id":203986681,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTg2Njgx","html_url":"https://github.com/AriChivukula/foia-db/pull/23","diff_url":"https://github.com/AriChivukula/foia-db/pull/23.diff","patch_url":"https://github.com/AriChivukula/foia-db/pull/23.patch","issue_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/23","number":23,"state":"open","locked":false,"title":"Edge","user":{"login":"arichiv","id":666538,"node_id":"MDQ6VXNlcjY2NjUzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/666538?v=4","gravatar_id":"","url":"https://api.github.com/users/arichiv","html_url":"https://github.com/arichiv","followers_url":"https://api.github.com/users/arichiv/followers","following_url":"https://api.github.com/users/arichiv/following{/other_user}","gists_url":"https://api.github.com/users/arichiv/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiv/subscriptions","organizations_url":"https://api.github.com/users/arichiv/orgs","repos_url":"https://api.github.com/users/arichiv/repos","events_url":"https://api.github.com/users/arichiv/events{/privacy}","received_events_url":"https://api.github.com/users/arichiv/received_events","type":"User","site_admin":false},"body":"closes #17","created_at":"2018-07-25T23:02:34Z","updated_at":"2018-07-26T01:32:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc6d05e8db83dee78bf8d1ada88095ace479359c","assignee":{"login":"arichiv","id":666538,"node_id":"MDQ6VXNlcjY2NjUzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/666538?v=4","gravatar_id":"","url":"https://api.github.com/users/arichiv","html_url":"https://github.com/arichiv","followers_url":"https://api.github.com/users/arichiv/followers","following_url":"https://api.github.com/users/arichiv/following{/other_user}","gists_url":"https://api.github.com/users/arichiv/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiv/subscriptions","organizations_url":"https://api.github.com/users/arichiv/orgs","repos_url":"https://api.github.com/users/arichiv/repos","events_url":"https://api.github.com/users/arichiv/events{/privacy}","received_events_url":"https://api.github.com/users/arichiv/received_events","type":"User","site_admin":false},"assignees":[{"login":"arichiv","id":666538,"node_id":"MDQ6VXNlcjY2NjUzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/666538?v=4","gravatar_id":"","url":"https://api.github.com/users/arichiv","html_url":"https://github.com/arichiv","followers_url":"https://api.github.com/users/arichiv/followers","following_url":"https://api.github.com/users/arichiv/following{/other_user}","gists_url":"https://api.github.com/users/arichiv/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiv/subscriptions","organizations_url":"https://api.github.com/users/arichiv/orgs","repos_url":"https://api.github.com/users/arichiv/repos","events_url":"https://api.github.com/users/arichiv/events{/privacy}","received_events_url":"https://api.github.com/users/arichiv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/AriChivukula/foia-db/milestones/2","html_url":"https://github.com/AriChivukula/foia-db/milestone/2","labels_url":"https://api.github.com/repos/AriChivukula/foia-db/milestones/2/labels","id":3518037,"node_id":"MDk6TWlsZXN0b25lMzUxODAzNw==","number":2,"title":"v0.1.X","description":"","creator":{"login":"arichiv","id":666538,"node_id":"MDQ6VXNlcjY2NjUzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/666538?v=4","gravatar_id":"","url":"https://api.github.com/users/arichiv","html_url":"https://github.com/arichiv","followers_url":"https://api.github.com/users/arichiv/followers","following_url":"https://api.github.com/users/arichiv/following{/other_user}","gists_url":"https://api.github.com/users/arichiv/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiv/subscriptions","organizations_url":"https://api.github.com/users/arichiv/orgs","repos_url":"https://api.github.com/users/arichiv/repos","events_url":"https://api.github.com/users/arichiv/events{/privacy}","received_events_url":"https://api.github.com/users/arichiv/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":7,"state":"closed","created_at":"2018-07-23T21:44:58Z","updated_at":"2018-07-25T23:05:28Z","due_on":null,"closed_at":"2018-07-25T23:05:28Z"},"commits_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23/commits","review_comments_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23/comments","review_comment_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/23/comments","statuses_url":"https://api.github.com/repos/AriChivukula/foia-db/statuses/2bd37b4a3378f28d85fc298cf78cdd48dfe6d5b5","head":{"label":"AriChivukula:edge","ref":"edge","sha":"2bd37b4a3378f28d85fc298cf78cdd48dfe6d5b5","user":{"login":"AriChivukula","id":39786874,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Nzg2ODc0","avatar_url":"https://avatars0.githubusercontent.com/u/39786874?v=4","gravatar_id":"","url":"https://api.github.com/users/AriChivukula","html_url":"https://github.com/AriChivukula","followers_url":"https://api.github.com/users/AriChivukula/followers","following_url":"https://api.github.com/users/AriChivukula/following{/other_user}","gists_url":"https://api.github.com/users/AriChivukula/gists{/gist_id}","starred_url":"https://api.github.com/users/AriChivukula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriChivukula/subscriptions","organizations_url":"https://api.github.com/users/AriChivukula/orgs","repos_url":"https://api.github.com/users/AriChivukula/repos","events_url":"https://api.github.com/users/AriChivukula/events{/privacy}","received_events_url":"https://api.github.com/users/AriChivukula/received_events","type":"Organization","site_admin":false},"repo":{"id":140913415,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5MTM0MTU=","name":"foia-db","full_name":"AriChivukula/foia-db","owner":{"login":"AriChivukula","id":39786874,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Nzg2ODc0","avatar_url":"https://avatars0.githubusercontent.com/u/39786874?v=4","gravatar_id":"","url":"https://api.github.com/users/AriChivukula","html_url":"https://github.com/AriChivukula","followers_url":"https://api.github.com/users/AriChivukula/followers","following_url":"https://api.github.com/users/AriChivukula/following{/other_user}","gists_url":"https://api.github.com/users/AriChivukula/gists{/gist_id}","starred_url":"https://api.github.com/users/AriChivukula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriChivukula/subscriptions","organizations_url":"https://api.github.com/users/AriChivukula/orgs","repos_url":"https://api.github.com/users/AriChivukula/repos","events_url":"https://api.github.com/users/AriChivukula/events{/privacy}","received_events_url":"https://api.github.com/users/AriChivukula/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AriChivukula/foia-db","description":"Freedom Oriented Information Automation Database","fork":false,"url":"https://api.github.com/repos/AriChivukula/foia-db","forks_url":"https://api.github.com/repos/AriChivukula/foia-db/forks","keys_url":"https://api.github.com/repos/AriChivukula/foia-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AriChivukula/foia-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AriChivukula/foia-db/teams","hooks_url":"https://api.github.com/repos/AriChivukula/foia-db/hooks","issue_events_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/events{/number}","events_url":"https://api.github.com/repos/AriChivukula/foia-db/events","assignees_url":"https://api.github.com/repos/AriChivukula/foia-db/assignees{/user}","branches_url":"https://api.github.com/repos/AriChivukula/foia-db/branches{/branch}","tags_url":"https://api.github.com/repos/AriChivukula/foia-db/tags","blobs_url":"https://api.github.com/repos/AriChivukula/foia-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AriChivukula/foia-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AriChivukula/foia-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/AriChivukula/foia-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AriChivukula/foia-db/statuses/{sha}","languages_url":"https://api.github.com/repos/AriChivukula/foia-db/languages","stargazers_url":"https://api.github.com/repos/AriChivukula/foia-db/stargazers","contributors_url":"https://api.github.com/repos/AriChivukula/foia-db/contributors","subscribers_url":"https://api.github.com/repos/AriChivukula/foia-db/subscribers","subscription_url":"https://api.github.com/repos/AriChivukula/foia-db/subscription","commits_url":"https://api.github.com/repos/AriChivukula/foia-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/AriChivukula/foia-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/AriChivukula/foia-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/AriChivukula/foia-db/contents/{+path}","compare_url":"https://api.github.com/repos/AriChivukula/foia-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AriChivukula/foia-db/merges","archive_url":"https://api.github.com/repos/AriChivukula/foia-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AriChivukula/foia-db/downloads","issues_url":"https://api.github.com/repos/AriChivukula/foia-db/issues{/number}","pulls_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls{/number}","milestones_url":"https://api.github.com/repos/AriChivukula/foia-db/milestones{/number}","notifications_url":"https://api.github.com/repos/AriChivukula/foia-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AriChivukula/foia-db/labels{/name}","releases_url":"https://api.github.com/repos/AriChivukula/foia-db/releases{/id}","deployments_url":"https://api.github.com/repos/AriChivukula/foia-db/deployments","created_at":"2018-07-14T03:39:46Z","updated_at":"2018-07-25T22:50:19Z","pushed_at":"2018-07-26T01:28:58Z","git_url":"git://github.com/AriChivukula/foia-db.git","ssh_url":"git@github.com:AriChivukula/foia-db.git","clone_url":"https://github.com/AriChivukula/foia-db.git","svn_url":"https://github.com/AriChivukula/foia-db","homepage":"https://www.npmjs.com/package/foia-db","size":10208,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"AriChivukula:master","ref":"master","sha":"710ccf0f189d4b04e9a7ef075a0e49856f359995","user":{"login":"AriChivukula","id":39786874,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Nzg2ODc0","avatar_url":"https://avatars0.githubusercontent.com/u/39786874?v=4","gravatar_id":"","url":"https://api.github.com/users/AriChivukula","html_url":"https://github.com/AriChivukula","followers_url":"https://api.github.com/users/AriChivukula/followers","following_url":"https://api.github.com/users/AriChivukula/following{/other_user}","gists_url":"https://api.github.com/users/AriChivukula/gists{/gist_id}","starred_url":"https://api.github.com/users/AriChivukula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriChivukula/subscriptions","organizations_url":"https://api.github.com/users/AriChivukula/orgs","repos_url":"https://api.github.com/users/AriChivukula/repos","events_url":"https://api.github.com/users/AriChivukula/events{/privacy}","received_events_url":"https://api.github.com/users/AriChivukula/received_events","type":"Organization","site_admin":false},"repo":{"id":140913415,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5MTM0MTU=","name":"foia-db","full_name":"AriChivukula/foia-db","owner":{"login":"AriChivukula","id":39786874,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Nzg2ODc0","avatar_url":"https://avatars0.githubusercontent.com/u/39786874?v=4","gravatar_id":"","url":"https://api.github.com/users/AriChivukula","html_url":"https://github.com/AriChivukula","followers_url":"https://api.github.com/users/AriChivukula/followers","following_url":"https://api.github.com/users/AriChivukula/following{/other_user}","gists_url":"https://api.github.com/users/AriChivukula/gists{/gist_id}","starred_url":"https://api.github.com/users/AriChivukula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriChivukula/subscriptions","organizations_url":"https://api.github.com/users/AriChivukula/orgs","repos_url":"https://api.github.com/users/AriChivukula/repos","events_url":"https://api.github.com/users/AriChivukula/events{/privacy}","received_events_url":"https://api.github.com/users/AriChivukula/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AriChivukula/foia-db","description":"Freedom Oriented Information Automation Database","fork":false,"url":"https://api.github.com/repos/AriChivukula/foia-db","forks_url":"https://api.github.com/repos/AriChivukula/foia-db/forks","keys_url":"https://api.github.com/repos/AriChivukula/foia-db/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AriChivukula/foia-db/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AriChivukula/foia-db/teams","hooks_url":"https://api.github.com/repos/AriChivukula/foia-db/hooks","issue_events_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/events{/number}","events_url":"https://api.github.com/repos/AriChivukula/foia-db/events","assignees_url":"https://api.github.com/repos/AriChivukula/foia-db/assignees{/user}","branches_url":"https://api.github.com/repos/AriChivukula/foia-db/branches{/branch}","tags_url":"https://api.github.com/repos/AriChivukula/foia-db/tags","blobs_url":"https://api.github.com/repos/AriChivukula/foia-db/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AriChivukula/foia-db/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AriChivukula/foia-db/git/refs{/sha}","trees_url":"https://api.github.com/repos/AriChivukula/foia-db/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AriChivukula/foia-db/statuses/{sha}","languages_url":"https://api.github.com/repos/AriChivukula/foia-db/languages","stargazers_url":"https://api.github.com/repos/AriChivukula/foia-db/stargazers","contributors_url":"https://api.github.com/repos/AriChivukula/foia-db/contributors","subscribers_url":"https://api.github.com/repos/AriChivukula/foia-db/subscribers","subscription_url":"https://api.github.com/repos/AriChivukula/foia-db/subscription","commits_url":"https://api.github.com/repos/AriChivukula/foia-db/commits{/sha}","git_commits_url":"https://api.github.com/repos/AriChivukula/foia-db/git/commits{/sha}","comments_url":"https://api.github.com/repos/AriChivukula/foia-db/comments{/number}","issue_comment_url":"https://api.github.com/repos/AriChivukula/foia-db/issues/comments{/number}","contents_url":"https://api.github.com/repos/AriChivukula/foia-db/contents/{+path}","compare_url":"https://api.github.com/repos/AriChivukula/foia-db/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AriChivukula/foia-db/merges","archive_url":"https://api.github.com/repos/AriChivukula/foia-db/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AriChivukula/foia-db/downloads","issues_url":"https://api.github.com/repos/AriChivukula/foia-db/issues{/number}","pulls_url":"https://api.github.com/repos/AriChivukula/foia-db/pulls{/number}","milestones_url":"https://api.github.com/repos/AriChivukula/foia-db/milestones{/number}","notifications_url":"https://api.github.com/repos/AriChivukula/foia-db/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AriChivukula/foia-db/labels{/name}","releases_url":"https://api.github.com/repos/AriChivukula/foia-db/releases{/id}","deployments_url":"https://api.github.com/repos/AriChivukula/foia-db/deployments","created_at":"2018-07-14T03:39:46Z","updated_at":"2018-07-25T22:50:19Z","pushed_at":"2018-07-26T01:28:58Z","git_url":"git://github.com/AriChivukula/foia-db.git","ssh_url":"git@github.com:AriChivukula/foia-db.git","clone_url":"https://github.com/AriChivukula/foia-db.git","svn_url":"https://github.com/AriChivukula/foia-db","homepage":"https://www.npmjs.com/package/foia-db","size":10208,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23"},"html":{"href":"https://github.com/AriChivukula/foia-db/pull/23"},"issue":{"href":"https://api.github.com/repos/AriChivukula/foia-db/issues/23"},"comments":{"href":"https://api.github.com/repos/AriChivukula/foia-db/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AriChivukula/foia-db/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/AriChivukula/foia-db/statuses/2bd37b4a3378f28d85fc298cf78cdd48dfe6d5b5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codeclimate"}}