{"action":"closed","number":1141,"pull_request":{"url":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141","id":183082396,"html_url":"https://github.com/SumOfUs/Champaign/pull/1141","diff_url":"https://github.com/SumOfUs/Champaign/pull/1141.diff","patch_url":"https://github.com/SumOfUs/Champaign/pull/1141.patch","issue_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/1141","number":1141,"state":"closed","locked":false,"title":"Add support for GDPR consent in petitions","user":{"login":"eyko","id":183071,"avatar_url":"https://avatars2.githubusercontent.com/u/183071?v=4","gravatar_id":"","url":"https://api.github.com/users/eyko","html_url":"https://github.com/eyko","followers_url":"https://api.github.com/users/eyko/followers","following_url":"https://api.github.com/users/eyko/following{/other_user}","gists_url":"https://api.github.com/users/eyko/gists{/gist_id}","starred_url":"https://api.github.com/users/eyko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyko/subscriptions","organizations_url":"https://api.github.com/users/eyko/orgs","repos_url":"https://api.github.com/users/eyko/repos","events_url":"https://api.github.com/users/eyko/events{/privacy}","received_events_url":"https://api.github.com/users/eyko/received_events","type":"User","site_admin":false},"body":"Adds a GDPR consent component to the member facing petition plugin. Countries with some metadata are loaded in the browser, which are then used to check if the user has selected a country that is a EU member. In the actions controller, we perform a similar check to see if the submitted country is an EU member, and if so make sure that the user also gave their consent before we record any data.\r\n\r\n*WIP* - This still needs tweaking. For example, the component initialisation needs to move to the different layouts that use the partial (and they can mount the component wherever they see fit). Another thing we'll want to improve is what country data we actually need in the browser: at the moment, we're loading all that the countries gem provides, but we might just want to load some useful information about countries that we might use in our various plugins (e.g. country alpha2 code, telephone prefix, name, alternative names, eu membership, and geo coordinates). \r\n\r\n*TODO* - We'll probably want to record the action but _not_ save the member's details (i.e. do not create a member record in Champaign) and certainly not subscribe them (for future mailings / contact on Action Kit). We haven't covered that use case: Member selects \"no\", but signs petition. At the moment we're _not_ recording their action, so in essence they're _not_ signing the petition.\r\n\r\nThis PR comes with two variants: `simple` and `selectable-buttons`. Templates need to pass this as the `variant` in the options object when initialising the component. ","created_at":"2018-04-20T14:38:34Z","updated_at":"2018-05-09T11:47:28Z","closed_at":"2018-05-09T11:47:28Z","merged_at":null,"merge_commit_sha":"f54e4ca2bee1cacfbf2106c657e2a218034b8964","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":336357469,"url":"https://api.github.com/repos/SumOfUs/Champaign/labels/WIP","name":"WIP","color":"eb6420","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141/commits","review_comments_url":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141/comments","review_comment_url":"https://api.github.com/repos/SumOfUs/Champaign/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/1141/comments","statuses_url":"https://api.github.com/repos/SumOfUs/Champaign/statuses/d5eb2a1595c487973c567af49d0c58c8ede1dca5","head":{"label":"SumOfUs:feature-gdpr-variant-1","ref":"feature-gdpr-variant-1","sha":"d5eb2a1595c487973c567af49d0c58c8ede1dca5","user":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars2.githubusercontent.com/u/7574652?v=4","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"repo":{"id":33684818,"name":"Champaign","full_name":"SumOfUs/Champaign","owner":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars2.githubusercontent.com/u/7574652?v=4","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SumOfUs/Champaign","description":"SumOfUs Online Campaign Platform.","fork":false,"url":"https://api.github.com/repos/SumOfUs/Champaign","forks_url":"https://api.github.com/repos/SumOfUs/Champaign/forks","keys_url":"https://api.github.com/repos/SumOfUs/Champaign/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumOfUs/Champaign/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumOfUs/Champaign/teams","hooks_url":"https://api.github.com/repos/SumOfUs/Champaign/hooks","issue_events_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/events{/number}","events_url":"https://api.github.com/repos/SumOfUs/Champaign/events","assignees_url":"https://api.github.com/repos/SumOfUs/Champaign/assignees{/user}","branches_url":"https://api.github.com/repos/SumOfUs/Champaign/branches{/branch}","tags_url":"https://api.github.com/repos/SumOfUs/Champaign/tags","blobs_url":"https://api.github.com/repos/SumOfUs/Champaign/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumOfUs/Champaign/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumOfUs/Champaign/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumOfUs/Champaign/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumOfUs/Champaign/statuses/{sha}","languages_url":"https://api.github.com/repos/SumOfUs/Champaign/languages","stargazers_url":"https://api.github.com/repos/SumOfUs/Champaign/stargazers","contributors_url":"https://api.github.com/repos/SumOfUs/Champaign/contributors","subscribers_url":"https://api.github.com/repos/SumOfUs/Champaign/subscribers","subscription_url":"https://api.github.com/repos/SumOfUs/Champaign/subscription","commits_url":"https://api.github.com/repos/SumOfUs/Champaign/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumOfUs/Champaign/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumOfUs/Champaign/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumOfUs/Champaign/contents/{+path}","compare_url":"https://api.github.com/repos/SumOfUs/Champaign/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumOfUs/Champaign/merges","archive_url":"https://api.github.com/repos/SumOfUs/Champaign/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumOfUs/Champaign/downloads","issues_url":"https://api.github.com/repos/SumOfUs/Champaign/issues{/number}","pulls_url":"https://api.github.com/repos/SumOfUs/Champaign/pulls{/number}","milestones_url":"https://api.github.com/repos/SumOfUs/Champaign/milestones{/number}","notifications_url":"https://api.github.com/repos/SumOfUs/Champaign/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumOfUs/Champaign/labels{/name}","releases_url":"https://api.github.com/repos/SumOfUs/Champaign/releases{/id}","deployments_url":"https://api.github.com/repos/SumOfUs/Champaign/deployments","created_at":"2015-04-09T18:16:20Z","updated_at":"2018-05-09T09:17:30Z","pushed_at":"2018-05-09T09:17:27Z","git_url":"git://github.com/SumOfUs/Champaign.git","ssh_url":"git@github.com:SumOfUs/Champaign.git","clone_url":"https://github.com/SumOfUs/Champaign.git","svn_url":"https://github.com/SumOfUs/Champaign","homepage":null,"size":12629,"stargazers_count":37,"watchers_count":37,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":27,"watchers":37,"default_branch":"development"}},"base":{"label":"SumOfUs:development","ref":"development","sha":"74044add5f6d2b07fcc4e3c538c3199def98ebc8","user":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars2.githubusercontent.com/u/7574652?v=4","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"repo":{"id":33684818,"name":"Champaign","full_name":"SumOfUs/Champaign","owner":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars2.githubusercontent.com/u/7574652?v=4","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SumOfUs/Champaign","description":"SumOfUs Online Campaign Platform.","fork":false,"url":"https://api.github.com/repos/SumOfUs/Champaign","forks_url":"https://api.github.com/repos/SumOfUs/Champaign/forks","keys_url":"https://api.github.com/repos/SumOfUs/Champaign/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumOfUs/Champaign/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumOfUs/Champaign/teams","hooks_url":"https://api.github.com/repos/SumOfUs/Champaign/hooks","issue_events_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/events{/number}","events_url":"https://api.github.com/repos/SumOfUs/Champaign/events","assignees_url":"https://api.github.com/repos/SumOfUs/Champaign/assignees{/user}","branches_url":"https://api.github.com/repos/SumOfUs/Champaign/branches{/branch}","tags_url":"https://api.github.com/repos/SumOfUs/Champaign/tags","blobs_url":"https://api.github.com/repos/SumOfUs/Champaign/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumOfUs/Champaign/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumOfUs/Champaign/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumOfUs/Champaign/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumOfUs/Champaign/statuses/{sha}","languages_url":"https://api.github.com/repos/SumOfUs/Champaign/languages","stargazers_url":"https://api.github.com/repos/SumOfUs/Champaign/stargazers","contributors_url":"https://api.github.com/repos/SumOfUs/Champaign/contributors","subscribers_url":"https://api.github.com/repos/SumOfUs/Champaign/subscribers","subscription_url":"https://api.github.com/repos/SumOfUs/Champaign/subscription","commits_url":"https://api.github.com/repos/SumOfUs/Champaign/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumOfUs/Champaign/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumOfUs/Champaign/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumOfUs/Champaign/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumOfUs/Champaign/contents/{+path}","compare_url":"https://api.github.com/repos/SumOfUs/Champaign/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumOfUs/Champaign/merges","archive_url":"https://api.github.com/repos/SumOfUs/Champaign/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumOfUs/Champaign/downloads","issues_url":"https://api.github.com/repos/SumOfUs/Champaign/issues{/number}","pulls_url":"https://api.github.com/repos/SumOfUs/Champaign/pulls{/number}","milestones_url":"https://api.github.com/repos/SumOfUs/Champaign/milestones{/number}","notifications_url":"https://api.github.com/repos/SumOfUs/Champaign/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumOfUs/Champaign/labels{/name}","releases_url":"https://api.github.com/repos/SumOfUs/Champaign/releases{/id}","deployments_url":"https://api.github.com/repos/SumOfUs/Champaign/deployments","created_at":"2015-04-09T18:16:20Z","updated_at":"2018-05-09T09:17:30Z","pushed_at":"2018-05-09T09:17:27Z","git_url":"git://github.com/SumOfUs/Champaign.git","ssh_url":"git@github.com:SumOfUs/Champaign.git","clone_url":"https://github.com/SumOfUs/Champaign.git","svn_url":"https://github.com/SumOfUs/Champaign","homepage":null,"size":12629,"stargazers_count":37,"watchers_count":37,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":27,"watchers":37,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141"},"html":{"href":"https://github.com/SumOfUs/Champaign/pull/1141"},"issue":{"href":"https://api.github.com/repos/SumOfUs/Champaign/issues/1141"},"comments":{"href":"https://api.github.com/repos/SumOfUs/Champaign/issues/1141/comments"},"review_comments":{"href":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141/comments"},"review_comment":{"href":"https://api.github.com/repos/SumOfUs/Champaign/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SumOfUs/Champaign/pulls/1141/commits"},"statuses":{"href":"https://api.github.com/repos/SumOfUs/Champaign/statuses/d5eb2a1595c487973c567af49d0c58c8ede1dca5"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":4,"review_comments":2,"maintainer_can_modify":false,"commits":3,"additions":399,"deletions":7,"changed_files":17}}
{"actor":{"display_login":"eyko"}}