{"action":"opened","number":2699,"pull_request":{"url":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699","id":82215760,"html_url":"https://github.com/alphagov/smart-answers/pull/2699","diff_url":"https://github.com/alphagov/smart-answers/pull/2699.diff","patch_url":"https://github.com/alphagov/smart-answers/pull/2699.patch","issue_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2699","number":2699,"state":"open","locked":false,"title":"Stop relying on slugs in areas returned by the imminence api","user":{"login":"h-lame","id":608,"avatar_url":"https://avatars.githubusercontent.com/u/608?v=3","gravatar_id":"","url":"https://api.github.com/users/h-lame","html_url":"https://github.com/h-lame","followers_url":"https://api.github.com/users/h-lame/followers","following_url":"https://api.github.com/users/h-lame/following{/other_user}","gists_url":"https://api.github.com/users/h-lame/gists{/gist_id}","starred_url":"https://api.github.com/users/h-lame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-lame/subscriptions","organizations_url":"https://api.github.com/users/h-lame/orgs","repos_url":"https://api.github.com/users/h-lame/repos","events_url":"https://api.github.com/users/h-lame/events{/privacy}","received_events_url":"https://api.github.com/users/h-lame/received_events","type":"User","site_admin":false},"body":"For: https://trello.com/c/PKAohBzb/468-stop-adding-slugs-to-areas-returned-from-mapit-by-imminence-2\r\n\r\nImminence is removing the slugs because they are based on transforming the\r\nnames, which aren't static pieces of data and so shouldn't be relied on.\r\nThe only real change here is how the benefit-cap-calculator determines if\r\nthe claimant is based in London or not.  Instead of looking for an area\r\nwith the slug 'london' we look for an area with the type EUR (European\r\nparliament constituency) and the name 'London'.  This is no more robust\r\nthan checking against the slug, as the names of the constituencies could\r\nchange, or the boundaries could change, or we could leave Europe and no\r\nlonger need these areas, but slug is going away so we have to do\r\nsomething.\r\n\r\nA better solution might be to check for known london councils, or use\r\nmapit directly instead of imminience and check for different area types\r\n(GLA for example) that are more permanent and idicative of a postcode\r\nbeing in London.  We may also need to refer to the legislation to see\r\nhow it defines what \"in London\" means as it may not equate to \"votes in\r\nthe London European Parliament Consitituency\".\r\n\r\nSee https://github.com/alphagov/imminence/pull/136 for the imminence change","created_at":"2016-08-22T15:50:53Z","updated_at":"2016-08-22T15:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699/commits","review_comments_url":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699/comments","review_comment_url":"https://api.github.com/repos/alphagov/smart-answers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2699/comments","statuses_url":"https://api.github.com/repos/alphagov/smart-answers/statuses/90948e3bc4ee276c14594af88c887dcaeaf0d36c","head":{"label":"alphagov:dont-rely-on-slugs-in-areas-from-imminence-api","ref":"dont-rely-on-slugs-in-areas-from-imminence-api","sha":"90948e3bc4ee276c14594af88c887dcaeaf0d36c","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2651887,"name":"smart-answers","full_name":"alphagov/smart-answers","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/smart-answers","description":"smart-answers","fork":false,"url":"https://api.github.com/repos/alphagov/smart-answers","forks_url":"https://api.github.com/repos/alphagov/smart-answers/forks","keys_url":"https://api.github.com/repos/alphagov/smart-answers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/smart-answers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/smart-answers/teams","hooks_url":"https://api.github.com/repos/alphagov/smart-answers/hooks","issue_events_url":"https://api.github.com/repos/alphagov/smart-answers/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/smart-answers/events","assignees_url":"https://api.github.com/repos/alphagov/smart-answers/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/smart-answers/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/smart-answers/tags","blobs_url":"https://api.github.com/repos/alphagov/smart-answers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/smart-answers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/smart-answers/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/smart-answers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/smart-answers/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/smart-answers/languages","stargazers_url":"https://api.github.com/repos/alphagov/smart-answers/stargazers","contributors_url":"https://api.github.com/repos/alphagov/smart-answers/contributors","subscribers_url":"https://api.github.com/repos/alphagov/smart-answers/subscribers","subscription_url":"https://api.github.com/repos/alphagov/smart-answers/subscription","commits_url":"https://api.github.com/repos/alphagov/smart-answers/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/smart-answers/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/smart-answers/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/smart-answers/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/smart-answers/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/smart-answers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/smart-answers/merges","archive_url":"https://api.github.com/repos/alphagov/smart-answers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/smart-answers/downloads","issues_url":"https://api.github.com/repos/alphagov/smart-answers/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/smart-answers/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/smart-answers/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/smart-answers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/smart-answers/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/smart-answers/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/smart-answers/deployments","created_at":"2011-10-26T15:39:01Z","updated_at":"2016-07-27T17:53:21Z","pushed_at":"2016-08-22T15:50:53Z","git_url":"git://github.com/alphagov/smart-answers.git","ssh_url":"git@github.com:alphagov/smart-answers.git","clone_url":"https://github.com/alphagov/smart-answers.git","svn_url":"https://github.com/alphagov/smart-answers","homepage":"","size":51232,"stargazers_count":80,"watchers_count":80,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":20,"forks":60,"open_issues":20,"watchers":80,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"b0bd776984948faffc989e46b48609f73352d1c8","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2651887,"name":"smart-answers","full_name":"alphagov/smart-answers","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/smart-answers","description":"smart-answers","fork":false,"url":"https://api.github.com/repos/alphagov/smart-answers","forks_url":"https://api.github.com/repos/alphagov/smart-answers/forks","keys_url":"https://api.github.com/repos/alphagov/smart-answers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/smart-answers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/smart-answers/teams","hooks_url":"https://api.github.com/repos/alphagov/smart-answers/hooks","issue_events_url":"https://api.github.com/repos/alphagov/smart-answers/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/smart-answers/events","assignees_url":"https://api.github.com/repos/alphagov/smart-answers/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/smart-answers/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/smart-answers/tags","blobs_url":"https://api.github.com/repos/alphagov/smart-answers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/smart-answers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/smart-answers/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/smart-answers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/smart-answers/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/smart-answers/languages","stargazers_url":"https://api.github.com/repos/alphagov/smart-answers/stargazers","contributors_url":"https://api.github.com/repos/alphagov/smart-answers/contributors","subscribers_url":"https://api.github.com/repos/alphagov/smart-answers/subscribers","subscription_url":"https://api.github.com/repos/alphagov/smart-answers/subscription","commits_url":"https://api.github.com/repos/alphagov/smart-answers/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/smart-answers/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/smart-answers/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/smart-answers/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/smart-answers/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/smart-answers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/smart-answers/merges","archive_url":"https://api.github.com/repos/alphagov/smart-answers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/smart-answers/downloads","issues_url":"https://api.github.com/repos/alphagov/smart-answers/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/smart-answers/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/smart-answers/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/smart-answers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/smart-answers/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/smart-answers/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/smart-answers/deployments","created_at":"2011-10-26T15:39:01Z","updated_at":"2016-07-27T17:53:21Z","pushed_at":"2016-08-22T15:50:53Z","git_url":"git://github.com/alphagov/smart-answers.git","ssh_url":"git@github.com:alphagov/smart-answers.git","clone_url":"https://github.com/alphagov/smart-answers.git","svn_url":"https://github.com/alphagov/smart-answers","homepage":"","size":51232,"stargazers_count":80,"watchers_count":80,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":20,"forks":60,"open_issues":20,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699"},"html":{"href":"https://github.com/alphagov/smart-answers/pull/2699"},"issue":{"href":"https://api.github.com/repos/alphagov/smart-answers/issues/2699"},"comments":{"href":"https://api.github.com/repos/alphagov/smart-answers/issues/2699/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/smart-answers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/smart-answers/pulls/2699/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/smart-answers/statuses/90948e3bc4ee276c14594af88c887dcaeaf0d36c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":17,"changed_files":7}}
{"actor":{"display_login":"h-lame"}}