{"action":"created","comment":{"url":"https://api.github.com/repos/sgmap/api-communes/pulls/comments/65367693","id":65367693,"diff_hunk":"@@ -0,0 +1,132 @@\n+/* eslint no-console: [\"off\"] */\n+const JSONStream = require('JSONStream');\n+const t = require('through2').obj;\n+const fs = require('fs');\n+const debug = require('debug')('integrate');\n+const centroid = require('turf-centroid');\n+const streamify = require('stream-array');\n+\n+\n+function integrate(options = {}) {\n+  const communes = new Map();\n+\n+  // Init paths\n+  const paths = {\n+    communesFilePath: options.communesFilePath || __dirname + '../data/communes-dp25.json',","path":"lib/integrate.js","position":15,"original_position":15,"commit_id":"39a20be19bd29893dfbfbaab2147761971bf51ae","original_commit_id":"39a20be19bd29893dfbfbaab2147761971bf51ae","user":{"login":"jdesboeufs","id":1231232,"avatar_url":"https://avatars.githubusercontent.com/u/1231232?v=3","gravatar_id":"","url":"https://api.github.com/users/jdesboeufs","html_url":"https://github.com/jdesboeufs","followers_url":"https://api.github.com/users/jdesboeufs/followers","following_url":"https://api.github.com/users/jdesboeufs/following{/other_user}","gists_url":"https://api.github.com/users/jdesboeufs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdesboeufs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdesboeufs/subscriptions","organizations_url":"https://api.github.com/users/jdesboeufs/orgs","repos_url":"https://api.github.com/users/jdesboeufs/repos","events_url":"https://api.github.com/users/jdesboeufs/events{/privacy}","received_events_url":"https://api.github.com/users/jdesboeufs/received_events","type":"User","site_admin":false},"body":"Broken","created_at":"2016-06-01T14:13:16Z","updated_at":"2016-06-01T14:13:16Z","html_url":"https://github.com/sgmap/api-communes/pull/17#discussion_r65367693","pull_request_url":"https://api.github.com/repos/sgmap/api-communes/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/comments/65367693"},"html":{"href":"https://github.com/sgmap/api-communes/pull/17#discussion_r65367693"},"pull_request":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/sgmap/api-communes/pulls/17","id":72029290,"html_url":"https://github.com/sgmap/api-communes/pull/17","diff_url":"https://github.com/sgmap/api-communes/pull/17.diff","patch_url":"https://github.com/sgmap/api-communes/pull/17.patch","issue_url":"https://api.github.com/repos/sgmap/api-communes/issues/17","number":17,"state":"open","locked":false,"title":"Reboot Integration","user":{"login":"tmerlier","id":7040549,"avatar_url":"https://avatars.githubusercontent.com/u/7040549?v=3","gravatar_id":"","url":"https://api.github.com/users/tmerlier","html_url":"https://github.com/tmerlier","followers_url":"https://api.github.com/users/tmerlier/followers","following_url":"https://api.github.com/users/tmerlier/following{/other_user}","gists_url":"https://api.github.com/users/tmerlier/gists{/gist_id}","starred_url":"https://api.github.com/users/tmerlier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmerlier/subscriptions","organizations_url":"https://api.github.com/users/tmerlier/orgs","repos_url":"https://api.github.com/users/tmerlier/repos","events_url":"https://api.github.com/users/tmerlier/events{/privacy}","received_events_url":"https://api.github.com/users/tmerlier/received_events","type":"User","site_admin":false},"body":"Réf #16","created_at":"2016-05-31T14:50:18Z","updated_at":"2016-06-01T14:13:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"841d3edc10b1084fa5e8530a3b935b1d90eb3d45","assignee":{"login":"tmerlier","id":7040549,"avatar_url":"https://avatars.githubusercontent.com/u/7040549?v=3","gravatar_id":"","url":"https://api.github.com/users/tmerlier","html_url":"https://github.com/tmerlier","followers_url":"https://api.github.com/users/tmerlier/followers","following_url":"https://api.github.com/users/tmerlier/following{/other_user}","gists_url":"https://api.github.com/users/tmerlier/gists{/gist_id}","starred_url":"https://api.github.com/users/tmerlier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmerlier/subscriptions","organizations_url":"https://api.github.com/users/tmerlier/orgs","repos_url":"https://api.github.com/users/tmerlier/repos","events_url":"https://api.github.com/users/tmerlier/events{/privacy}","received_events_url":"https://api.github.com/users/tmerlier/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sgmap/api-communes/milestones/1","html_url":"https://github.com/sgmap/api-communes/milestones/1.0","labels_url":"https://api.github.com/repos/sgmap/api-communes/milestones/1/labels","id":1797346,"number":1,"title":"1.0","description":"","creator":{"login":"jdesboeufs","id":1231232,"avatar_url":"https://avatars.githubusercontent.com/u/1231232?v=3","gravatar_id":"","url":"https://api.github.com/users/jdesboeufs","html_url":"https://github.com/jdesboeufs","followers_url":"https://api.github.com/users/jdesboeufs/followers","following_url":"https://api.github.com/users/jdesboeufs/following{/other_user}","gists_url":"https://api.github.com/users/jdesboeufs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdesboeufs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdesboeufs/subscriptions","organizations_url":"https://api.github.com/users/jdesboeufs/orgs","repos_url":"https://api.github.com/users/jdesboeufs/repos","events_url":"https://api.github.com/users/jdesboeufs/events{/privacy}","received_events_url":"https://api.github.com/users/jdesboeufs/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2016-05-30T18:57:11Z","updated_at":"2016-05-31T20:10:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/sgmap/api-communes/pulls/17/commits","review_comments_url":"https://api.github.com/repos/sgmap/api-communes/pulls/17/comments","review_comment_url":"https://api.github.com/repos/sgmap/api-communes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sgmap/api-communes/issues/17/comments","statuses_url":"https://api.github.com/repos/sgmap/api-communes/statuses/39a20be19bd29893dfbfbaab2147761971bf51ae","head":{"label":"sgmap:reboot-integration","ref":"reboot-integration","sha":"39a20be19bd29893dfbfbaab2147761971bf51ae","user":{"login":"sgmap","id":7874148,"avatar_url":"https://avatars.githubusercontent.com/u/7874148?v=3","gravatar_id":"","url":"https://api.github.com/users/sgmap","html_url":"https://github.com/sgmap","followers_url":"https://api.github.com/users/sgmap/followers","following_url":"https://api.github.com/users/sgmap/following{/other_user}","gists_url":"https://api.github.com/users/sgmap/gists{/gist_id}","starred_url":"https://api.github.com/users/sgmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgmap/subscriptions","organizations_url":"https://api.github.com/users/sgmap/orgs","repos_url":"https://api.github.com/users/sgmap/repos","events_url":"https://api.github.com/users/sgmap/events{/privacy}","received_events_url":"https://api.github.com/users/sgmap/received_events","type":"Organization","site_admin":false},"repo":{"id":59763982,"name":"api-communes","full_name":"sgmap/api-communes","owner":{"login":"sgmap","id":7874148,"avatar_url":"https://avatars.githubusercontent.com/u/7874148?v=3","gravatar_id":"","url":"https://api.github.com/users/sgmap","html_url":"https://github.com/sgmap","followers_url":"https://api.github.com/users/sgmap/followers","following_url":"https://api.github.com/users/sgmap/following{/other_user}","gists_url":"https://api.github.com/users/sgmap/gists{/gist_id}","starred_url":"https://api.github.com/users/sgmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgmap/subscriptions","organizations_url":"https://api.github.com/users/sgmap/orgs","repos_url":"https://api.github.com/users/sgmap/repos","events_url":"https://api.github.com/users/sgmap/events{/privacy}","received_events_url":"https://api.github.com/users/sgmap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sgmap/api-communes","description":"Rechercher des communes et accéder à leurs informations de base","fork":false,"url":"https://api.github.com/repos/sgmap/api-communes","forks_url":"https://api.github.com/repos/sgmap/api-communes/forks","keys_url":"https://api.github.com/repos/sgmap/api-communes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgmap/api-communes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgmap/api-communes/teams","hooks_url":"https://api.github.com/repos/sgmap/api-communes/hooks","issue_events_url":"https://api.github.com/repos/sgmap/api-communes/issues/events{/number}","events_url":"https://api.github.com/repos/sgmap/api-communes/events","assignees_url":"https://api.github.com/repos/sgmap/api-communes/assignees{/user}","branches_url":"https://api.github.com/repos/sgmap/api-communes/branches{/branch}","tags_url":"https://api.github.com/repos/sgmap/api-communes/tags","blobs_url":"https://api.github.com/repos/sgmap/api-communes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgmap/api-communes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgmap/api-communes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgmap/api-communes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgmap/api-communes/statuses/{sha}","languages_url":"https://api.github.com/repos/sgmap/api-communes/languages","stargazers_url":"https://api.github.com/repos/sgmap/api-communes/stargazers","contributors_url":"https://api.github.com/repos/sgmap/api-communes/contributors","subscribers_url":"https://api.github.com/repos/sgmap/api-communes/subscribers","subscription_url":"https://api.github.com/repos/sgmap/api-communes/subscription","commits_url":"https://api.github.com/repos/sgmap/api-communes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgmap/api-communes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgmap/api-communes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgmap/api-communes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgmap/api-communes/contents/{+path}","compare_url":"https://api.github.com/repos/sgmap/api-communes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgmap/api-communes/merges","archive_url":"https://api.github.com/repos/sgmap/api-communes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgmap/api-communes/downloads","issues_url":"https://api.github.com/repos/sgmap/api-communes/issues{/number}","pulls_url":"https://api.github.com/repos/sgmap/api-communes/pulls{/number}","milestones_url":"https://api.github.com/repos/sgmap/api-communes/milestones{/number}","notifications_url":"https://api.github.com/repos/sgmap/api-communes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgmap/api-communes/labels{/name}","releases_url":"https://api.github.com/repos/sgmap/api-communes/releases{/id}","deployments_url":"https://api.github.com/repos/sgmap/api-communes/deployments","created_at":"2016-05-26T15:59:05Z","updated_at":"2016-05-30T14:24:42Z","pushed_at":"2016-06-01T13:21:11Z","git_url":"git://github.com/sgmap/api-communes.git","ssh_url":"git@github.com:sgmap/api-communes.git","clone_url":"https://github.com/sgmap/api-communes.git","svn_url":"https://github.com/sgmap/api-communes","homepage":"https://api.gouv.fr/api/geoapi.html","size":62,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"sgmap:master","ref":"master","sha":"0b87073078f91d2e18760d15e81dcb4a6006cf3c","user":{"login":"sgmap","id":7874148,"avatar_url":"https://avatars.githubusercontent.com/u/7874148?v=3","gravatar_id":"","url":"https://api.github.com/users/sgmap","html_url":"https://github.com/sgmap","followers_url":"https://api.github.com/users/sgmap/followers","following_url":"https://api.github.com/users/sgmap/following{/other_user}","gists_url":"https://api.github.com/users/sgmap/gists{/gist_id}","starred_url":"https://api.github.com/users/sgmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgmap/subscriptions","organizations_url":"https://api.github.com/users/sgmap/orgs","repos_url":"https://api.github.com/users/sgmap/repos","events_url":"https://api.github.com/users/sgmap/events{/privacy}","received_events_url":"https://api.github.com/users/sgmap/received_events","type":"Organization","site_admin":false},"repo":{"id":59763982,"name":"api-communes","full_name":"sgmap/api-communes","owner":{"login":"sgmap","id":7874148,"avatar_url":"https://avatars.githubusercontent.com/u/7874148?v=3","gravatar_id":"","url":"https://api.github.com/users/sgmap","html_url":"https://github.com/sgmap","followers_url":"https://api.github.com/users/sgmap/followers","following_url":"https://api.github.com/users/sgmap/following{/other_user}","gists_url":"https://api.github.com/users/sgmap/gists{/gist_id}","starred_url":"https://api.github.com/users/sgmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgmap/subscriptions","organizations_url":"https://api.github.com/users/sgmap/orgs","repos_url":"https://api.github.com/users/sgmap/repos","events_url":"https://api.github.com/users/sgmap/events{/privacy}","received_events_url":"https://api.github.com/users/sgmap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sgmap/api-communes","description":"Rechercher des communes et accéder à leurs informations de base","fork":false,"url":"https://api.github.com/repos/sgmap/api-communes","forks_url":"https://api.github.com/repos/sgmap/api-communes/forks","keys_url":"https://api.github.com/repos/sgmap/api-communes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgmap/api-communes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgmap/api-communes/teams","hooks_url":"https://api.github.com/repos/sgmap/api-communes/hooks","issue_events_url":"https://api.github.com/repos/sgmap/api-communes/issues/events{/number}","events_url":"https://api.github.com/repos/sgmap/api-communes/events","assignees_url":"https://api.github.com/repos/sgmap/api-communes/assignees{/user}","branches_url":"https://api.github.com/repos/sgmap/api-communes/branches{/branch}","tags_url":"https://api.github.com/repos/sgmap/api-communes/tags","blobs_url":"https://api.github.com/repos/sgmap/api-communes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgmap/api-communes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgmap/api-communes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgmap/api-communes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgmap/api-communes/statuses/{sha}","languages_url":"https://api.github.com/repos/sgmap/api-communes/languages","stargazers_url":"https://api.github.com/repos/sgmap/api-communes/stargazers","contributors_url":"https://api.github.com/repos/sgmap/api-communes/contributors","subscribers_url":"https://api.github.com/repos/sgmap/api-communes/subscribers","subscription_url":"https://api.github.com/repos/sgmap/api-communes/subscription","commits_url":"https://api.github.com/repos/sgmap/api-communes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgmap/api-communes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgmap/api-communes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgmap/api-communes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgmap/api-communes/contents/{+path}","compare_url":"https://api.github.com/repos/sgmap/api-communes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgmap/api-communes/merges","archive_url":"https://api.github.com/repos/sgmap/api-communes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgmap/api-communes/downloads","issues_url":"https://api.github.com/repos/sgmap/api-communes/issues{/number}","pulls_url":"https://api.github.com/repos/sgmap/api-communes/pulls{/number}","milestones_url":"https://api.github.com/repos/sgmap/api-communes/milestones{/number}","notifications_url":"https://api.github.com/repos/sgmap/api-communes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgmap/api-communes/labels{/name}","releases_url":"https://api.github.com/repos/sgmap/api-communes/releases{/id}","deployments_url":"https://api.github.com/repos/sgmap/api-communes/deployments","created_at":"2016-05-26T15:59:05Z","updated_at":"2016-05-30T14:24:42Z","pushed_at":"2016-06-01T13:21:11Z","git_url":"git://github.com/sgmap/api-communes.git","ssh_url":"git@github.com:sgmap/api-communes.git","clone_url":"https://github.com/sgmap/api-communes.git","svn_url":"https://github.com/sgmap/api-communes","homepage":"https://api.gouv.fr/api/geoapi.html","size":62,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/17"},"html":{"href":"https://github.com/sgmap/api-communes/pull/17"},"issue":{"href":"https://api.github.com/repos/sgmap/api-communes/issues/17"},"comments":{"href":"https://api.github.com/repos/sgmap/api-communes/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sgmap/api-communes/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/sgmap/api-communes/statuses/39a20be19bd29893dfbfbaab2147761971bf51ae"}}}}
{"actor":{"display_login":"jdesboeufs"}}