{"action":"opened","number":208,"pull_request":{"url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208","id":205740290,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NzQwMjkw","html_url":"https://github.com/ONSdigital/response-operations-ui/pull/208","diff_url":"https://github.com/ONSdigital/response-operations-ui/pull/208.diff","patch_url":"https://github.com/ONSdigital/response-operations-ui/pull/208.patch","issue_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/208","number":208,"state":"open","locked":false,"title":"Use an app factory pattern for Response Operations UI","user":{"login":"jcox-dev","id":28348457,"node_id":"MDQ6VXNlcjI4MzQ4NDU3","avatar_url":"https://avatars0.githubusercontent.com/u/28348457?v=4","gravatar_id":"","url":"https://api.github.com/users/jcox-dev","html_url":"https://github.com/jcox-dev","followers_url":"https://api.github.com/users/jcox-dev/followers","following_url":"https://api.github.com/users/jcox-dev/following{/other_user}","gists_url":"https://api.github.com/users/jcox-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jcox-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcox-dev/subscriptions","organizations_url":"https://api.github.com/users/jcox-dev/orgs","repos_url":"https://api.github.com/users/jcox-dev/repos","events_url":"https://api.github.com/users/jcox-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jcox-dev/received_events","type":"User","site_admin":false},"body":"# Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nMakes it easier to spin up an instance (or instances) of the Flask application on demand. Useful for testing and less dependency on setting everything up at import-time.\r\n\r\n# What has changed\r\n<!--- What code changes has been made -->\r\n<!--- Has there been any refactoring -->\r\n<!--- What tests have been written -->\r\nChanged to use a reproducible app factory pattern (better late than never!).\r\n\r\n# How to test?\r\n<!--- Describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. -->\r\n<!--- Are there any automated tests that mean changes don't need to be manually changed -->\r\nUnit tests 🍰 \r\n\r\n# Links\r\n<!--- Add any links to issues (trello, github issues) -->\r\n<!--- Links to any documentation -->\r\n<!--- Links to any related PRs -->\r\n- [TBL#138](https://trello.com/c/zdMOd6hC)\r\n- http://flask.pocoo.org/docs/1.0/patterns/appfactories/\r\n","created_at":"2018-08-02T13:46:11Z","updated_at":"2018-08-02T13:46:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/208/comments","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/82b9ab8f51d59eb063de54567c888a8c49e1c1a2","head":{"label":"ONSdigital:app-factory-pattern","ref":"app-factory-pattern","sha":"82b9ab8f51d59eb063de54567c888a8c49e1c1a2","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":112603785,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2MDM3ODU=","name":"response-operations-ui","full_name":"ONSdigital/response-operations-ui","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/response-operations-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ONSdigital/response-operations-ui","forks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/forks","keys_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/teams","hooks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/events","assignees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/tags","blobs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscription","commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/merges","archive_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/downloads","issues_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/deployments","created_at":"2017-11-30T11:31:09Z","updated_at":"2018-08-02T09:30:53Z","pushed_at":"2018-08-02T13:42:41Z","git_url":"git://github.com/ONSdigital/response-operations-ui.git","ssh_url":"git@github.com:ONSdigital/response-operations-ui.git","clone_url":"https://github.com/ONSdigital/response-operations-ui.git","svn_url":"https://github.com/ONSdigital/response-operations-ui","homepage":null,"size":575,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"90a800cfcdea349f9e467f732f5ee3d2b6fdbd05","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":112603785,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2MDM3ODU=","name":"response-operations-ui","full_name":"ONSdigital/response-operations-ui","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/response-operations-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ONSdigital/response-operations-ui","forks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/forks","keys_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/teams","hooks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/events","assignees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/tags","blobs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscription","commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/merges","archive_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/downloads","issues_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/deployments","created_at":"2017-11-30T11:31:09Z","updated_at":"2018-08-02T09:30:53Z","pushed_at":"2018-08-02T13:42:41Z","git_url":"git://github.com/ONSdigital/response-operations-ui.git","ssh_url":"git@github.com:ONSdigital/response-operations-ui.git","clone_url":"https://github.com/ONSdigital/response-operations-ui.git","svn_url":"https://github.com/ONSdigital/response-operations-ui","homepage":null,"size":575,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208"},"html":{"href":"https://github.com/ONSdigital/response-operations-ui/pull/208"},"issue":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/208"},"comments":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/82b9ab8f51d59eb063de54567c888a8c49e1c1a2"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":548,"deletions":505,"changed_files":42}}
{"actor":{"display_login":"jcox-dev"}}