{"action":"closed","number":418,"pull_request":{"url":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418","id":219671690,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NjcxNjkw","html_url":"https://github.com/DemocracyClub/EveryElection/pull/418","diff_url":"https://github.com/DemocracyClub/EveryElection/pull/418.diff","patch_url":"https://github.com/DemocracyClub/EveryElection/pull/418.patch","issue_url":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/418","number":418,"state":"closed","locked":false,"title":"Election status part 1 - soft delete","user":{"login":"chris48s","id":6025893,"node_id":"MDQ6VXNlcjYwMjU4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6025893?v=4","gravatar_id":"","url":"https://api.github.com/users/chris48s","html_url":"https://github.com/chris48s","followers_url":"https://api.github.com/users/chris48s/followers","following_url":"https://api.github.com/users/chris48s/following{/other_user}","gists_url":"https://api.github.com/users/chris48s/gists{/gist_id}","starred_url":"https://api.github.com/users/chris48s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris48s/subscriptions","organizations_url":"https://api.github.com/users/chris48s/orgs","repos_url":"https://api.github.com/users/chris48s/repos","events_url":"https://api.github.com/users/chris48s/events{/privacy}","received_events_url":"https://api.github.com/users/chris48s/received_events","type":"User","site_admin":false},"body":"High-level tasks in this PR are:\r\n\r\n* Add a 'deleted' status for elections\r\n* Set all the elections that already exist to 'approved'\r\n* Hide elections that aren't approved in most contexts\r\n* Add a flag to include deleted elections in the API (so YNR can use it)\r\n\r\nFunctionality-wise, this just deals with the case where we want to (soft-)delete an election which has been added in error, but it also lays down how I'm going to approach the rest of the work around moderation so would be useful to get some feedback at this point. I quite like the approach of using 2 managers with different base query sets - it made changing the `/api` and `/admin` behaviour pretty trivial :)\r\n\r\nI've taken on board Joe's suggestion that we should treat internal and external events separately and I'm going to treat \"election is cancelled\" flag as meta-data we store against an election (like the date, or a notice of election document. 'status' (in terms of events we expose to the outside world) can be treated as a value derived from meta-data which is independent of the moderation process. I think this will be a better way to handle it.","created_at":"2018-10-02T11:34:26Z","updated_at":"2018-10-04T15:08:25Z","closed_at":"2018-10-04T15:08:25Z","merged_at":"2018-10-04T15:08:25Z","merge_commit_sha":"251e09116097d377f574aa8184361609058d0397","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418/commits","review_comments_url":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418/comments","review_comment_url":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/418/comments","statuses_url":"https://api.github.com/repos/DemocracyClub/EveryElection/statuses/436df3e341b0fdf67962db4d046784d6955cebfb","head":{"label":"chris48s:election_status","ref":"election_status","sha":"436df3e341b0fdf67962db4d046784d6955cebfb","user":{"login":"chris48s","id":6025893,"node_id":"MDQ6VXNlcjYwMjU4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6025893?v=4","gravatar_id":"","url":"https://api.github.com/users/chris48s","html_url":"https://github.com/chris48s","followers_url":"https://api.github.com/users/chris48s/followers","following_url":"https://api.github.com/users/chris48s/following{/other_user}","gists_url":"https://api.github.com/users/chris48s/gists{/gist_id}","starred_url":"https://api.github.com/users/chris48s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris48s/subscriptions","organizations_url":"https://api.github.com/users/chris48s/orgs","repos_url":"https://api.github.com/users/chris48s/repos","events_url":"https://api.github.com/users/chris48s/events{/privacy}","received_events_url":"https://api.github.com/users/chris48s/received_events","type":"User","site_admin":false},"repo":{"id":85244907,"node_id":"MDEwOlJlcG9zaXRvcnk4NTI0NDkwNw==","name":"EveryElection","full_name":"chris48s/EveryElection","private":false,"owner":{"login":"chris48s","id":6025893,"node_id":"MDQ6VXNlcjYwMjU4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6025893?v=4","gravatar_id":"","url":"https://api.github.com/users/chris48s","html_url":"https://github.com/chris48s","followers_url":"https://api.github.com/users/chris48s/followers","following_url":"https://api.github.com/users/chris48s/following{/other_user}","gists_url":"https://api.github.com/users/chris48s/gists{/gist_id}","starred_url":"https://api.github.com/users/chris48s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris48s/subscriptions","organizations_url":"https://api.github.com/users/chris48s/orgs","repos_url":"https://api.github.com/users/chris48s/repos","events_url":"https://api.github.com/users/chris48s/events{/privacy}","received_events_url":"https://api.github.com/users/chris48s/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chris48s/EveryElection","description":"For recording every election in the UK","fork":true,"url":"https://api.github.com/repos/chris48s/EveryElection","forks_url":"https://api.github.com/repos/chris48s/EveryElection/forks","keys_url":"https://api.github.com/repos/chris48s/EveryElection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chris48s/EveryElection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chris48s/EveryElection/teams","hooks_url":"https://api.github.com/repos/chris48s/EveryElection/hooks","issue_events_url":"https://api.github.com/repos/chris48s/EveryElection/issues/events{/number}","events_url":"https://api.github.com/repos/chris48s/EveryElection/events","assignees_url":"https://api.github.com/repos/chris48s/EveryElection/assignees{/user}","branches_url":"https://api.github.com/repos/chris48s/EveryElection/branches{/branch}","tags_url":"https://api.github.com/repos/chris48s/EveryElection/tags","blobs_url":"https://api.github.com/repos/chris48s/EveryElection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chris48s/EveryElection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chris48s/EveryElection/git/refs{/sha}","trees_url":"https://api.github.com/repos/chris48s/EveryElection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chris48s/EveryElection/statuses/{sha}","languages_url":"https://api.github.com/repos/chris48s/EveryElection/languages","stargazers_url":"https://api.github.com/repos/chris48s/EveryElection/stargazers","contributors_url":"https://api.github.com/repos/chris48s/EveryElection/contributors","subscribers_url":"https://api.github.com/repos/chris48s/EveryElection/subscribers","subscription_url":"https://api.github.com/repos/chris48s/EveryElection/subscription","commits_url":"https://api.github.com/repos/chris48s/EveryElection/commits{/sha}","git_commits_url":"https://api.github.com/repos/chris48s/EveryElection/git/commits{/sha}","comments_url":"https://api.github.com/repos/chris48s/EveryElection/comments{/number}","issue_comment_url":"https://api.github.com/repos/chris48s/EveryElection/issues/comments{/number}","contents_url":"https://api.github.com/repos/chris48s/EveryElection/contents/{+path}","compare_url":"https://api.github.com/repos/chris48s/EveryElection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chris48s/EveryElection/merges","archive_url":"https://api.github.com/repos/chris48s/EveryElection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chris48s/EveryElection/downloads","issues_url":"https://api.github.com/repos/chris48s/EveryElection/issues{/number}","pulls_url":"https://api.github.com/repos/chris48s/EveryElection/pulls{/number}","milestones_url":"https://api.github.com/repos/chris48s/EveryElection/milestones{/number}","notifications_url":"https://api.github.com/repos/chris48s/EveryElection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chris48s/EveryElection/labels{/name}","releases_url":"https://api.github.com/repos/chris48s/EveryElection/releases{/id}","deployments_url":"https://api.github.com/repos/chris48s/EveryElection/deployments","created_at":"2017-03-16T21:53:28Z","updated_at":"2018-08-17T09:12:02Z","pushed_at":"2018-10-04T14:57:56Z","git_url":"git://github.com/chris48s/EveryElection.git","ssh_url":"git@github.com:chris48s/EveryElection.git","clone_url":"https://github.com/chris48s/EveryElection.git","svn_url":"https://github.com/chris48s/EveryElection","homepage":null,"size":39881,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DemocracyClub:master","ref":"master","sha":"4794838cee2de292826b4563d9f9273691ecd4c6","user":{"login":"DemocracyClub","id":6901194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MDExOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6901194?v=4","gravatar_id":"","url":"https://api.github.com/users/DemocracyClub","html_url":"https://github.com/DemocracyClub","followers_url":"https://api.github.com/users/DemocracyClub/followers","following_url":"https://api.github.com/users/DemocracyClub/following{/other_user}","gists_url":"https://api.github.com/users/DemocracyClub/gists{/gist_id}","starred_url":"https://api.github.com/users/DemocracyClub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemocracyClub/subscriptions","organizations_url":"https://api.github.com/users/DemocracyClub/orgs","repos_url":"https://api.github.com/users/DemocracyClub/repos","events_url":"https://api.github.com/users/DemocracyClub/events{/privacy}","received_events_url":"https://api.github.com/users/DemocracyClub/received_events","type":"Organization","site_admin":false},"repo":{"id":70236537,"node_id":"MDEwOlJlcG9zaXRvcnk3MDIzNjUzNw==","name":"EveryElection","full_name":"DemocracyClub/EveryElection","private":false,"owner":{"login":"DemocracyClub","id":6901194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MDExOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6901194?v=4","gravatar_id":"","url":"https://api.github.com/users/DemocracyClub","html_url":"https://github.com/DemocracyClub","followers_url":"https://api.github.com/users/DemocracyClub/followers","following_url":"https://api.github.com/users/DemocracyClub/following{/other_user}","gists_url":"https://api.github.com/users/DemocracyClub/gists{/gist_id}","starred_url":"https://api.github.com/users/DemocracyClub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemocracyClub/subscriptions","organizations_url":"https://api.github.com/users/DemocracyClub/orgs","repos_url":"https://api.github.com/users/DemocracyClub/repos","events_url":"https://api.github.com/users/DemocracyClub/events{/privacy}","received_events_url":"https://api.github.com/users/DemocracyClub/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DemocracyClub/EveryElection","description":":ballot_box_with_check: For recording every election in the UK","fork":false,"url":"https://api.github.com/repos/DemocracyClub/EveryElection","forks_url":"https://api.github.com/repos/DemocracyClub/EveryElection/forks","keys_url":"https://api.github.com/repos/DemocracyClub/EveryElection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DemocracyClub/EveryElection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DemocracyClub/EveryElection/teams","hooks_url":"https://api.github.com/repos/DemocracyClub/EveryElection/hooks","issue_events_url":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/events{/number}","events_url":"https://api.github.com/repos/DemocracyClub/EveryElection/events","assignees_url":"https://api.github.com/repos/DemocracyClub/EveryElection/assignees{/user}","branches_url":"https://api.github.com/repos/DemocracyClub/EveryElection/branches{/branch}","tags_url":"https://api.github.com/repos/DemocracyClub/EveryElection/tags","blobs_url":"https://api.github.com/repos/DemocracyClub/EveryElection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DemocracyClub/EveryElection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DemocracyClub/EveryElection/git/refs{/sha}","trees_url":"https://api.github.com/repos/DemocracyClub/EveryElection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DemocracyClub/EveryElection/statuses/{sha}","languages_url":"https://api.github.com/repos/DemocracyClub/EveryElection/languages","stargazers_url":"https://api.github.com/repos/DemocracyClub/EveryElection/stargazers","contributors_url":"https://api.github.com/repos/DemocracyClub/EveryElection/contributors","subscribers_url":"https://api.github.com/repos/DemocracyClub/EveryElection/subscribers","subscription_url":"https://api.github.com/repos/DemocracyClub/EveryElection/subscription","commits_url":"https://api.github.com/repos/DemocracyClub/EveryElection/commits{/sha}","git_commits_url":"https://api.github.com/repos/DemocracyClub/EveryElection/git/commits{/sha}","comments_url":"https://api.github.com/repos/DemocracyClub/EveryElection/comments{/number}","issue_comment_url":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/comments{/number}","contents_url":"https://api.github.com/repos/DemocracyClub/EveryElection/contents/{+path}","compare_url":"https://api.github.com/repos/DemocracyClub/EveryElection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DemocracyClub/EveryElection/merges","archive_url":"https://api.github.com/repos/DemocracyClub/EveryElection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DemocracyClub/EveryElection/downloads","issues_url":"https://api.github.com/repos/DemocracyClub/EveryElection/issues{/number}","pulls_url":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls{/number}","milestones_url":"https://api.github.com/repos/DemocracyClub/EveryElection/milestones{/number}","notifications_url":"https://api.github.com/repos/DemocracyClub/EveryElection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DemocracyClub/EveryElection/labels{/name}","releases_url":"https://api.github.com/repos/DemocracyClub/EveryElection/releases{/id}","deployments_url":"https://api.github.com/repos/DemocracyClub/EveryElection/deployments","created_at":"2016-10-07T10:22:20Z","updated_at":"2018-10-02T11:43:34Z","pushed_at":"2018-10-04T15:08:25Z","git_url":"git://github.com/DemocracyClub/EveryElection.git","ssh_url":"git@github.com:DemocracyClub/EveryElection.git","clone_url":"https://github.com/DemocracyClub/EveryElection.git","svn_url":"https://github.com/DemocracyClub/EveryElection","homepage":"","size":39861,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":54,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":7,"open_issues":54,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418"},"html":{"href":"https://github.com/DemocracyClub/EveryElection/pull/418"},"issue":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/418"},"comments":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/issues/418/comments"},"review_comments":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418/comments"},"review_comment":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/pulls/418/commits"},"statuses":{"href":"https://api.github.com/repos/DemocracyClub/EveryElection/statuses/436df3e341b0fdf67962db4d046784d6955cebfb"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"chris48s","id":6025893,"node_id":"MDQ6VXNlcjYwMjU4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/6025893?v=4","gravatar_id":"","url":"https://api.github.com/users/chris48s","html_url":"https://github.com/chris48s","followers_url":"https://api.github.com/users/chris48s/followers","following_url":"https://api.github.com/users/chris48s/following{/other_user}","gists_url":"https://api.github.com/users/chris48s/gists{/gist_id}","starred_url":"https://api.github.com/users/chris48s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris48s/subscriptions","organizations_url":"https://api.github.com/users/chris48s/orgs","repos_url":"https://api.github.com/users/chris48s/repos","events_url":"https://api.github.com/users/chris48s/events{/privacy}","received_events_url":"https://api.github.com/users/chris48s/received_events","type":"User","site_admin":false},"comments":2,"review_comments":13,"maintainer_can_modify":false,"commits":9,"additions":191,"deletions":77,"changed_files":21}}
{"actor":{"display_login":"chris48s"}}