{"action":"created","comment":{"url":"https://api.github.com/repos/freelyformd/github-todos/pulls/comments/232674330","pull_request_review_id":173920865,"id":232674330,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjY3NDMzMA==","diff_hunk":"@@ -16,31 +16,29 @@ export default async function addIssuesToRepo (context: Context, newIssues: Issu\n   newIssues.forEach(async ({title, body, authors}) => {\n     const assignees = uniq(authors);\n \n-    /**\n-     * Am up to writing a function that removes checked out or no longer existing issue comments.\n-     */\n-\n-    const currentGHIssueComments = find(ghIssueComment => ghIssueComment.comments === body, ghIssues);\n-    const newGHIssueComments = currentGHIssueComments.comments.includes(\" - [x] \") || !(currentGHIssueComments.comments === body) ? replaceCommentArray(currentGHIssueComments.comments, body) : currentGHIssueComments.comments;\n+    const currentGHIssue = find(ghIssue => ghIssue.title === title, ghIssues);\n+    const newGHIssueComments = currentGHIssue.comments.includes(\"- [x]\") || !(currentGHIssue.comments === body)\n+     ? newIssueBody(currentGHIssue.comments, body)\n+     : currentGHIssue.comments;\n \n     const fields = {\n       owner,\n       repo,\n-      body,\n+      newGHIssueComments,","path":"src/lib/github/addIssuesToRepo.ts","position":25,"original_position":19,"commit_id":"bf100cb85d7720c848adcf6a304cb6fa839bcc77","original_commit_id":"bf100cb85d7720c848adcf6a304cb6fa839bcc77","user":{"login":"epicallan","id":6281527,"node_id":"MDQ6VXNlcjYyODE1Mjc=","avatar_url":"https://avatars3.githubusercontent.com/u/6281527?v=4","gravatar_id":"","url":"https://api.github.com/users/epicallan","html_url":"https://github.com/epicallan","followers_url":"https://api.github.com/users/epicallan/followers","following_url":"https://api.github.com/users/epicallan/following{/other_user}","gists_url":"https://api.github.com/users/epicallan/gists{/gist_id}","starred_url":"https://api.github.com/users/epicallan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epicallan/subscriptions","organizations_url":"https://api.github.com/users/epicallan/orgs","repos_url":"https://api.github.com/users/epicallan/repos","events_url":"https://api.github.com/users/epicallan/events{/privacy}","received_events_url":"https://api.github.com/users/epicallan/received_events","type":"User","site_admin":false},"body":"this should be `body:  newGHIssueComments`","created_at":"2018-11-12T14:21:04Z","updated_at":"2018-11-12T14:30:44Z","html_url":"https://github.com/freelyformd/github-todos/pull/70#discussion_r232674330","pull_request_url":"https://api.github.com/repos/freelyformd/github-todos/pulls/70","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/comments/232674330"},"html":{"href":"https://github.com/freelyformd/github-todos/pull/70#discussion_r232674330"},"pull_request":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/freelyformd/github-todos/pulls/70","id":229285780,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5Mjg1Nzgw","html_url":"https://github.com/freelyformd/github-todos/pull/70","diff_url":"https://github.com/freelyformd/github-todos/pull/70.diff","patch_url":"https://github.com/freelyformd/github-todos/pull/70.patch","issue_url":"https://api.github.com/repos/freelyformd/github-todos/issues/70","number":70,"state":"open","locked":false,"title":"removes checked out or no longer existing issue comments","user":{"login":"lubegasimon","id":34124177,"node_id":"MDQ6VXNlcjM0MTI0MTc3","avatar_url":"https://avatars0.githubusercontent.com/u/34124177?v=4","gravatar_id":"","url":"https://api.github.com/users/lubegasimon","html_url":"https://github.com/lubegasimon","followers_url":"https://api.github.com/users/lubegasimon/followers","following_url":"https://api.github.com/users/lubegasimon/following{/other_user}","gists_url":"https://api.github.com/users/lubegasimon/gists{/gist_id}","starred_url":"https://api.github.com/users/lubegasimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lubegasimon/subscriptions","organizations_url":"https://api.github.com/users/lubegasimon/orgs","repos_url":"https://api.github.com/users/lubegasimon/repos","events_url":"https://api.github.com/users/lubegasimon/events{/privacy}","received_events_url":"https://api.github.com/users/lubegasimon/received_events","type":"User","site_admin":false},"body":" a function that removes checked out or no longer existing issue comments","created_at":"2018-11-08T08:35:40Z","updated_at":"2018-11-12T14:30:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a8233455abc4888171145644ed8115f77d62eba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/freelyformd/github-todos/pulls/70/commits","review_comments_url":"https://api.github.com/repos/freelyformd/github-todos/pulls/70/comments","review_comment_url":"https://api.github.com/repos/freelyformd/github-todos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freelyformd/github-todos/issues/70/comments","statuses_url":"https://api.github.com/repos/freelyformd/github-todos/statuses/bf100cb85d7720c848adcf6a304cb6fa839bcc77","head":{"label":"freelyformd:remove-checked-out-or-nolonger-existing-issueComments","ref":"remove-checked-out-or-nolonger-existing-issueComments","sha":"bf100cb85d7720c848adcf6a304cb6fa839bcc77","user":{"login":"freelyformd","id":23217262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjE3MjYy","avatar_url":"https://avatars1.githubusercontent.com/u/23217262?v=4","gravatar_id":"","url":"https://api.github.com/users/freelyformd","html_url":"https://github.com/freelyformd","followers_url":"https://api.github.com/users/freelyformd/followers","following_url":"https://api.github.com/users/freelyformd/following{/other_user}","gists_url":"https://api.github.com/users/freelyformd/gists{/gist_id}","starred_url":"https://api.github.com/users/freelyformd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freelyformd/subscriptions","organizations_url":"https://api.github.com/users/freelyformd/orgs","repos_url":"https://api.github.com/users/freelyformd/repos","events_url":"https://api.github.com/users/freelyformd/events{/privacy}","received_events_url":"https://api.github.com/users/freelyformd/received_events","type":"Organization","site_admin":false},"repo":{"id":147319170,"node_id":"MDEwOlJlcG9zaXRvcnkxNDczMTkxNzA=","name":"github-todos","full_name":"freelyformd/github-todos","private":false,"owner":{"login":"freelyformd","id":23217262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjE3MjYy","avatar_url":"https://avatars1.githubusercontent.com/u/23217262?v=4","gravatar_id":"","url":"https://api.github.com/users/freelyformd","html_url":"https://github.com/freelyformd","followers_url":"https://api.github.com/users/freelyformd/followers","following_url":"https://api.github.com/users/freelyformd/following{/other_user}","gists_url":"https://api.github.com/users/freelyformd/gists{/gist_id}","starred_url":"https://api.github.com/users/freelyformd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freelyformd/subscriptions","organizations_url":"https://api.github.com/users/freelyformd/orgs","repos_url":"https://api.github.com/users/freelyformd/repos","events_url":"https://api.github.com/users/freelyformd/events{/privacy}","received_events_url":"https://api.github.com/users/freelyformd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freelyformd/github-todos","description":"MVP: Analyse a repo's code for TODOs and FixMe comments & make github issues out of them","fork":false,"url":"https://api.github.com/repos/freelyformd/github-todos","forks_url":"https://api.github.com/repos/freelyformd/github-todos/forks","keys_url":"https://api.github.com/repos/freelyformd/github-todos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freelyformd/github-todos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freelyformd/github-todos/teams","hooks_url":"https://api.github.com/repos/freelyformd/github-todos/hooks","issue_events_url":"https://api.github.com/repos/freelyformd/github-todos/issues/events{/number}","events_url":"https://api.github.com/repos/freelyformd/github-todos/events","assignees_url":"https://api.github.com/repos/freelyformd/github-todos/assignees{/user}","branches_url":"https://api.github.com/repos/freelyformd/github-todos/branches{/branch}","tags_url":"https://api.github.com/repos/freelyformd/github-todos/tags","blobs_url":"https://api.github.com/repos/freelyformd/github-todos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freelyformd/github-todos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freelyformd/github-todos/git/refs{/sha}","trees_url":"https://api.github.com/repos/freelyformd/github-todos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freelyformd/github-todos/statuses/{sha}","languages_url":"https://api.github.com/repos/freelyformd/github-todos/languages","stargazers_url":"https://api.github.com/repos/freelyformd/github-todos/stargazers","contributors_url":"https://api.github.com/repos/freelyformd/github-todos/contributors","subscribers_url":"https://api.github.com/repos/freelyformd/github-todos/subscribers","subscription_url":"https://api.github.com/repos/freelyformd/github-todos/subscription","commits_url":"https://api.github.com/repos/freelyformd/github-todos/commits{/sha}","git_commits_url":"https://api.github.com/repos/freelyformd/github-todos/git/commits{/sha}","comments_url":"https://api.github.com/repos/freelyformd/github-todos/comments{/number}","issue_comment_url":"https://api.github.com/repos/freelyformd/github-todos/issues/comments{/number}","contents_url":"https://api.github.com/repos/freelyformd/github-todos/contents/{+path}","compare_url":"https://api.github.com/repos/freelyformd/github-todos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freelyformd/github-todos/merges","archive_url":"https://api.github.com/repos/freelyformd/github-todos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freelyformd/github-todos/downloads","issues_url":"https://api.github.com/repos/freelyformd/github-todos/issues{/number}","pulls_url":"https://api.github.com/repos/freelyformd/github-todos/pulls{/number}","milestones_url":"https://api.github.com/repos/freelyformd/github-todos/milestones{/number}","notifications_url":"https://api.github.com/repos/freelyformd/github-todos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freelyformd/github-todos/labels{/name}","releases_url":"https://api.github.com/repos/freelyformd/github-todos/releases{/id}","deployments_url":"https://api.github.com/repos/freelyformd/github-todos/deployments","created_at":"2018-09-04T09:11:36Z","updated_at":"2018-11-07T08:19:21Z","pushed_at":"2018-11-12T13:50:19Z","git_url":"git://github.com/freelyformd/github-todos.git","ssh_url":"git@github.com:freelyformd/github-todos.git","clone_url":"https://github.com/freelyformd/github-todos.git","svn_url":"https://github.com/freelyformd/github-todos","homepage":"","size":261,"stargazers_count":4,"watchers_count":4,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"base":{"label":"freelyformd:master","ref":"master","sha":"b81a3c86899ddcec0253f9b497fd4c01b1d2c6a4","user":{"login":"freelyformd","id":23217262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjE3MjYy","avatar_url":"https://avatars1.githubusercontent.com/u/23217262?v=4","gravatar_id":"","url":"https://api.github.com/users/freelyformd","html_url":"https://github.com/freelyformd","followers_url":"https://api.github.com/users/freelyformd/followers","following_url":"https://api.github.com/users/freelyformd/following{/other_user}","gists_url":"https://api.github.com/users/freelyformd/gists{/gist_id}","starred_url":"https://api.github.com/users/freelyformd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freelyformd/subscriptions","organizations_url":"https://api.github.com/users/freelyformd/orgs","repos_url":"https://api.github.com/users/freelyformd/repos","events_url":"https://api.github.com/users/freelyformd/events{/privacy}","received_events_url":"https://api.github.com/users/freelyformd/received_events","type":"Organization","site_admin":false},"repo":{"id":147319170,"node_id":"MDEwOlJlcG9zaXRvcnkxNDczMTkxNzA=","name":"github-todos","full_name":"freelyformd/github-todos","private":false,"owner":{"login":"freelyformd","id":23217262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjE3MjYy","avatar_url":"https://avatars1.githubusercontent.com/u/23217262?v=4","gravatar_id":"","url":"https://api.github.com/users/freelyformd","html_url":"https://github.com/freelyformd","followers_url":"https://api.github.com/users/freelyformd/followers","following_url":"https://api.github.com/users/freelyformd/following{/other_user}","gists_url":"https://api.github.com/users/freelyformd/gists{/gist_id}","starred_url":"https://api.github.com/users/freelyformd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freelyformd/subscriptions","organizations_url":"https://api.github.com/users/freelyformd/orgs","repos_url":"https://api.github.com/users/freelyformd/repos","events_url":"https://api.github.com/users/freelyformd/events{/privacy}","received_events_url":"https://api.github.com/users/freelyformd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freelyformd/github-todos","description":"MVP: Analyse a repo's code for TODOs and FixMe comments & make github issues out of them","fork":false,"url":"https://api.github.com/repos/freelyformd/github-todos","forks_url":"https://api.github.com/repos/freelyformd/github-todos/forks","keys_url":"https://api.github.com/repos/freelyformd/github-todos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freelyformd/github-todos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freelyformd/github-todos/teams","hooks_url":"https://api.github.com/repos/freelyformd/github-todos/hooks","issue_events_url":"https://api.github.com/repos/freelyformd/github-todos/issues/events{/number}","events_url":"https://api.github.com/repos/freelyformd/github-todos/events","assignees_url":"https://api.github.com/repos/freelyformd/github-todos/assignees{/user}","branches_url":"https://api.github.com/repos/freelyformd/github-todos/branches{/branch}","tags_url":"https://api.github.com/repos/freelyformd/github-todos/tags","blobs_url":"https://api.github.com/repos/freelyformd/github-todos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freelyformd/github-todos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freelyformd/github-todos/git/refs{/sha}","trees_url":"https://api.github.com/repos/freelyformd/github-todos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freelyformd/github-todos/statuses/{sha}","languages_url":"https://api.github.com/repos/freelyformd/github-todos/languages","stargazers_url":"https://api.github.com/repos/freelyformd/github-todos/stargazers","contributors_url":"https://api.github.com/repos/freelyformd/github-todos/contributors","subscribers_url":"https://api.github.com/repos/freelyformd/github-todos/subscribers","subscription_url":"https://api.github.com/repos/freelyformd/github-todos/subscription","commits_url":"https://api.github.com/repos/freelyformd/github-todos/commits{/sha}","git_commits_url":"https://api.github.com/repos/freelyformd/github-todos/git/commits{/sha}","comments_url":"https://api.github.com/repos/freelyformd/github-todos/comments{/number}","issue_comment_url":"https://api.github.com/repos/freelyformd/github-todos/issues/comments{/number}","contents_url":"https://api.github.com/repos/freelyformd/github-todos/contents/{+path}","compare_url":"https://api.github.com/repos/freelyformd/github-todos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freelyformd/github-todos/merges","archive_url":"https://api.github.com/repos/freelyformd/github-todos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freelyformd/github-todos/downloads","issues_url":"https://api.github.com/repos/freelyformd/github-todos/issues{/number}","pulls_url":"https://api.github.com/repos/freelyformd/github-todos/pulls{/number}","milestones_url":"https://api.github.com/repos/freelyformd/github-todos/milestones{/number}","notifications_url":"https://api.github.com/repos/freelyformd/github-todos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freelyformd/github-todos/labels{/name}","releases_url":"https://api.github.com/repos/freelyformd/github-todos/releases{/id}","deployments_url":"https://api.github.com/repos/freelyformd/github-todos/deployments","created_at":"2018-09-04T09:11:36Z","updated_at":"2018-11-07T08:19:21Z","pushed_at":"2018-11-12T13:50:19Z","git_url":"git://github.com/freelyformd/github-todos.git","ssh_url":"git@github.com:freelyformd/github-todos.git","clone_url":"https://github.com/freelyformd/github-todos.git","svn_url":"https://github.com/freelyformd/github-todos","homepage":"","size":261,"stargazers_count":4,"watchers_count":4,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/70"},"html":{"href":"https://github.com/freelyformd/github-todos/pull/70"},"issue":{"href":"https://api.github.com/repos/freelyformd/github-todos/issues/70"},"comments":{"href":"https://api.github.com/repos/freelyformd/github-todos/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freelyformd/github-todos/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/freelyformd/github-todos/statuses/bf100cb85d7720c848adcf6a304cb6fa839bcc77"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"epicallan"}}