{"action":"created","comment":{"url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments/66584054","id":66584054,"diff_hunk":"@@ -157,9 +167,13 @@ impl From<mimir::Addr> for GeocodingResponse {\n         let label = Some(other.name);\n         let housenumber = Some(other.house_number);\n         let street_name = Some(other.street.name);\n-        let (postcode, city, admins) = other.street.administrative_region.map_or((None, None, vec![]), |admin| {\n-            (Some(admin.zip_code.clone()), Some(admin.name.clone()), vec![admin])\n+        // for the moment for the 'postcode' and the 'city', we take the postcode\n+        // and name of the first admin of the street\n+        // TODO: change this (with a 'city tag in the admin ?')\n+        let (postcode, city) = other.street.administrative_regions.iter().next().map_or((None, None), |admin| {\n+            (Some(admin.zip_code.clone()), Some(admin.name.clone()))","path":"libs/bragi/src/model.rs.in","position":63,"original_position":63,"commit_id":"3a381c34270cfce90b5272aaa15aa17bb186f7fc","original_commit_id":"3a381c34270cfce90b5272aaa15aa17bb186f7fc","user":{"login":"TeXitoi","id":5787066,"avatar_url":"https://avatars.githubusercontent.com/u/5787066?v=3","gravatar_id":"","url":"https://api.github.com/users/TeXitoi","html_url":"https://github.com/TeXitoi","followers_url":"https://api.github.com/users/TeXitoi/followers","following_url":"https://api.github.com/users/TeXitoi/following{/other_user}","gists_url":"https://api.github.com/users/TeXitoi/gists{/gist_id}","starred_url":"https://api.github.com/users/TeXitoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeXitoi/subscriptions","organizations_url":"https://api.github.com/users/TeXitoi/orgs","repos_url":"https://api.github.com/users/TeXitoi/repos","events_url":"https://api.github.com/users/TeXitoi/events{/privacy}","received_events_url":"https://api.github.com/users/TeXitoi/received_events","type":"User","site_admin":false},"body":"duplicated code","created_at":"2016-06-10T09:15:40Z","updated_at":"2016-06-10T09:15:40Z","html_url":"https://github.com/CanalTP/mimirsbrunn/pull/55#discussion_r66584054","pull_request_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments/66584054"},"html":{"href":"https://github.com/CanalTP/mimirsbrunn/pull/55#discussion_r66584054"},"pull_request":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55","id":73229053,"html_url":"https://github.com/CanalTP/mimirsbrunn/pull/55","diff_url":"https://github.com/CanalTP/mimirsbrunn/pull/55.diff","patch_url":"https://github.com/CanalTP/mimirsbrunn/pull/55.patch","issue_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/55","number":55,"state":"open","locked":false,"title":"link street to admin","user":{"login":"antoine-de","id":3987698,"avatar_url":"https://avatars.githubusercontent.com/u/3987698?v=3","gravatar_id":"","url":"https://api.github.com/users/antoine-de","html_url":"https://github.com/antoine-de","followers_url":"https://api.github.com/users/antoine-de/followers","following_url":"https://api.github.com/users/antoine-de/following{/other_user}","gists_url":"https://api.github.com/users/antoine-de/gists{/gist_id}","starred_url":"https://api.github.com/users/antoine-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoine-de/subscriptions","organizations_url":"https://api.github.com/users/antoine-de/orgs","repos_url":"https://api.github.com/users/antoine-de/repos","events_url":"https://api.github.com/users/antoine-de/events{/privacy}","received_events_url":"https://api.github.com/users/antoine-de/received_events","type":"User","site_admin":false},"body":"for the moment there are not quadtree plugged to this, we look for the\r\nadmins by looping through all admins.\r\n\r\nThe quadtree search will be done in another PR\r\n\r\nTODO in this PR:\r\n * [x] ToGeom for mimir::Place\r\n * [x] postcode handling","created_at":"2016-06-09T14:56:12Z","updated_at":"2016-06-10T09:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecf6eccd03c4d1386573ffb0929e0d6eb933422e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55/commits","review_comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55/comments","review_comment_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/55/comments","statuses_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/3a381c34270cfce90b5272aaa15aa17bb186f7fc","head":{"label":"antoine-de:street_to_admin","ref":"street_to_admin","sha":"3a381c34270cfce90b5272aaa15aa17bb186f7fc","user":{"login":"antoine-de","id":3987698,"avatar_url":"https://avatars.githubusercontent.com/u/3987698?v=3","gravatar_id":"","url":"https://api.github.com/users/antoine-de","html_url":"https://github.com/antoine-de","followers_url":"https://api.github.com/users/antoine-de/followers","following_url":"https://api.github.com/users/antoine-de/following{/other_user}","gists_url":"https://api.github.com/users/antoine-de/gists{/gist_id}","starred_url":"https://api.github.com/users/antoine-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoine-de/subscriptions","organizations_url":"https://api.github.com/users/antoine-de/orgs","repos_url":"https://api.github.com/users/antoine-de/repos","events_url":"https://api.github.com/users/antoine-de/events{/privacy}","received_events_url":"https://api.github.com/users/antoine-de/received_events","type":"User","site_admin":false},"repo":{"id":55225265,"name":"mimirsbrunn","full_name":"antoine-de/mimirsbrunn","owner":{"login":"antoine-de","id":3987698,"avatar_url":"https://avatars.githubusercontent.com/u/3987698?v=3","gravatar_id":"","url":"https://api.github.com/users/antoine-de","html_url":"https://github.com/antoine-de","followers_url":"https://api.github.com/users/antoine-de/followers","following_url":"https://api.github.com/users/antoine-de/following{/other_user}","gists_url":"https://api.github.com/users/antoine-de/gists{/gist_id}","starred_url":"https://api.github.com/users/antoine-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoine-de/subscriptions","organizations_url":"https://api.github.com/users/antoine-de/orgs","repos_url":"https://api.github.com/users/antoine-de/repos","events_url":"https://api.github.com/users/antoine-de/events{/privacy}","received_events_url":"https://api.github.com/users/antoine-de/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antoine-de/mimirsbrunn","description":"mimir data import","fork":true,"url":"https://api.github.com/repos/antoine-de/mimirsbrunn","forks_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/forks","keys_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/teams","hooks_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/hooks","issue_events_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/issues/events{/number}","events_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/events","assignees_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/assignees{/user}","branches_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/branches{/branch}","tags_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/tags","blobs_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/git/refs{/sha}","trees_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/statuses/{sha}","languages_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/languages","stargazers_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/stargazers","contributors_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/contributors","subscribers_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/subscribers","subscription_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/subscription","commits_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/commits{/sha}","git_commits_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/git/commits{/sha}","comments_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/comments{/number}","issue_comment_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/issues/comments{/number}","contents_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/contents/{+path}","compare_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/merges","archive_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/downloads","issues_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/issues{/number}","pulls_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/pulls{/number}","milestones_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/milestones{/number}","notifications_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/labels{/name}","releases_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/releases{/id}","deployments_url":"https://api.github.com/repos/antoine-de/mimirsbrunn/deployments","created_at":"2016-04-01T10:47:20Z","updated_at":"2016-03-31T14:02:09Z","pushed_at":"2016-06-10T08:32:28Z","git_url":"git://github.com/antoine-de/mimirsbrunn.git","ssh_url":"git@github.com:antoine-de/mimirsbrunn.git","clone_url":"https://github.com/antoine-de/mimirsbrunn.git","svn_url":"https://github.com/antoine-de/mimirsbrunn","homepage":null,"size":274,"stargazers_count":0,"watchers_count":0,"language":null,"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":"CanalTP:master","ref":"master","sha":"6f2991c61e4a20235d52c9c1207fc761d01c90be","user":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"repo":{"id":55155075,"name":"mimirsbrunn","full_name":"CanalTP/mimirsbrunn","owner":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanalTP/mimirsbrunn","description":"mimir data import","fork":false,"url":"https://api.github.com/repos/CanalTP/mimirsbrunn","forks_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/forks","keys_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/teams","hooks_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/hooks","issue_events_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/events{/number}","events_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/events","assignees_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/assignees{/user}","branches_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/branches{/branch}","tags_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/tags","blobs_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/{sha}","languages_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/languages","stargazers_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/stargazers","contributors_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/contributors","subscribers_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/subscribers","subscription_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/subscription","commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/contents/{+path}","compare_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/merges","archive_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/downloads","issues_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues{/number}","pulls_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls{/number}","milestones_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/milestones{/number}","notifications_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/labels{/name}","releases_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/releases{/id}","deployments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/deployments","created_at":"2016-03-31T14:02:09Z","updated_at":"2016-05-18T21:04:55Z","pushed_at":"2016-06-10T08:49:23Z","git_url":"git://github.com/CanalTP/mimirsbrunn.git","ssh_url":"git@github.com:CanalTP/mimirsbrunn.git","clone_url":"https://github.com/CanalTP/mimirsbrunn.git","svn_url":"https://github.com/CanalTP/mimirsbrunn","homepage":null,"size":261,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":4,"forks":8,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55"},"html":{"href":"https://github.com/CanalTP/mimirsbrunn/pull/55"},"issue":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/55"},"comments":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/3a381c34270cfce90b5272aaa15aa17bb186f7fc"}}}}
{"actor":{"display_login":"TeXitoi"}}