{"action":"opened","number":52,"pull_request":{"url":"https://api.github.com/repos/andela/ah-shakas/pulls/52","id":234477838,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NDc3ODM4","html_url":"https://github.com/andela/ah-shakas/pull/52","diff_url":"https://github.com/andela/ah-shakas/pull/52.diff","patch_url":"https://github.com/andela/ah-shakas/pull/52.patch","issue_url":"https://api.github.com/repos/andela/ah-shakas/issues/52","number":52,"state":"open","locked":false,"title":"#162294898 Heroku CORS whitelist fix.","user":{"login":"codingedward","id":15171489,"node_id":"MDQ6VXNlcjE1MTcxNDg5","avatar_url":"https://avatars3.githubusercontent.com/u/15171489?v=4","gravatar_id":"","url":"https://api.github.com/users/codingedward","html_url":"https://github.com/codingedward","followers_url":"https://api.github.com/users/codingedward/followers","following_url":"https://api.github.com/users/codingedward/following{/other_user}","gists_url":"https://api.github.com/users/codingedward/gists{/gist_id}","starred_url":"https://api.github.com/users/codingedward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingedward/subscriptions","organizations_url":"https://api.github.com/users/codingedward/orgs","repos_url":"https://api.github.com/users/codingedward/repos","events_url":"https://api.github.com/users/codingedward/events{/privacy}","received_events_url":"https://api.github.com/users/codingedward/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n- Fixes the bug with CORS whitelist in Heroku by allowing us to set an environment variable `CORS_WHITELIST` with comma separated values of the allowed origins.\r\n\r\n#### How should this be manually tested?\r\n- Clone the github repository `git clone https://github.com/andela/ah-shakas` on your machine\r\n\r\n- Change your working directory to the project folder `cd ah-shakas`\r\n\r\n- Create a `.env` with the following values\r\n\r\n```\r\nDB_NAME=\r\nDB_PASSWORD=\r\nDB_HOST=\r\nDB_USER=\r\nEMAIL_HOST=\r\nEMAIL_HOST_USER=\r\nEMAIL_HOST_PASSWORD=\r\nEMAIL_PORT=\r\nEMAIL_SENDER=\r\nDB_NAME=\r\nDB_USER=\r\nDB_PASSWORD=\r\nDB_HOST=\r\nPASSWORD_RESET=\r\nCORS_WHITELIST=\r\n```\r\n\r\n- Checkout to this PR's branch `git checkout ft-article-ratings-162294898`\r\n\r\n- Create a virtual environment using [pipenv](https://pipenv.readthedocs.io/en/latest/) `pipenv shell`\r\n\r\n - Install dependencies `pipenv install`\r\n\r\n- Run the tests `python manage.py test`\r\n\r\n- To test with Postman, first run `python manage.py runserver` and use the endpoints highlighted above.\r\n\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n[#162294898](https://www.pivotaltracker.com/n/projects/2198533/stories/162294898)\r\n","created_at":"2018-11-29T01:17:33Z","updated_at":"2018-11-29T01:17:33Z","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/andela/ah-shakas/pulls/52/commits","review_comments_url":"https://api.github.com/repos/andela/ah-shakas/pulls/52/comments","review_comment_url":"https://api.github.com/repos/andela/ah-shakas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/ah-shakas/issues/52/comments","statuses_url":"https://api.github.com/repos/andela/ah-shakas/statuses/4ed9b89a2bda8015bfb60eb6890f0ebe2ddbcf8e","head":{"label":"codingedward:bg-heroku-cors-162294898","ref":"bg-heroku-cors-162294898","sha":"4ed9b89a2bda8015bfb60eb6890f0ebe2ddbcf8e","user":{"login":"codingedward","id":15171489,"node_id":"MDQ6VXNlcjE1MTcxNDg5","avatar_url":"https://avatars3.githubusercontent.com/u/15171489?v=4","gravatar_id":"","url":"https://api.github.com/users/codingedward","html_url":"https://github.com/codingedward","followers_url":"https://api.github.com/users/codingedward/followers","following_url":"https://api.github.com/users/codingedward/following{/other_user}","gists_url":"https://api.github.com/users/codingedward/gists{/gist_id}","starred_url":"https://api.github.com/users/codingedward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingedward/subscriptions","organizations_url":"https://api.github.com/users/codingedward/orgs","repos_url":"https://api.github.com/users/codingedward/repos","events_url":"https://api.github.com/users/codingedward/events{/privacy}","received_events_url":"https://api.github.com/users/codingedward/received_events","type":"User","site_admin":false},"repo":{"id":158791392,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg3OTEzOTI=","name":"ah-shakas","full_name":"codingedward/ah-shakas","private":false,"owner":{"login":"codingedward","id":15171489,"node_id":"MDQ6VXNlcjE1MTcxNDg5","avatar_url":"https://avatars3.githubusercontent.com/u/15171489?v=4","gravatar_id":"","url":"https://api.github.com/users/codingedward","html_url":"https://github.com/codingedward","followers_url":"https://api.github.com/users/codingedward/followers","following_url":"https://api.github.com/users/codingedward/following{/other_user}","gists_url":"https://api.github.com/users/codingedward/gists{/gist_id}","starred_url":"https://api.github.com/users/codingedward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingedward/subscriptions","organizations_url":"https://api.github.com/users/codingedward/orgs","repos_url":"https://api.github.com/users/codingedward/repos","events_url":"https://api.github.com/users/codingedward/events{/privacy}","received_events_url":"https://api.github.com/users/codingedward/received_events","type":"User","site_admin":false},"html_url":"https://github.com/codingedward/ah-shakas","description":null,"fork":true,"url":"https://api.github.com/repos/codingedward/ah-shakas","forks_url":"https://api.github.com/repos/codingedward/ah-shakas/forks","keys_url":"https://api.github.com/repos/codingedward/ah-shakas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codingedward/ah-shakas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codingedward/ah-shakas/teams","hooks_url":"https://api.github.com/repos/codingedward/ah-shakas/hooks","issue_events_url":"https://api.github.com/repos/codingedward/ah-shakas/issues/events{/number}","events_url":"https://api.github.com/repos/codingedward/ah-shakas/events","assignees_url":"https://api.github.com/repos/codingedward/ah-shakas/assignees{/user}","branches_url":"https://api.github.com/repos/codingedward/ah-shakas/branches{/branch}","tags_url":"https://api.github.com/repos/codingedward/ah-shakas/tags","blobs_url":"https://api.github.com/repos/codingedward/ah-shakas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codingedward/ah-shakas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codingedward/ah-shakas/git/refs{/sha}","trees_url":"https://api.github.com/repos/codingedward/ah-shakas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codingedward/ah-shakas/statuses/{sha}","languages_url":"https://api.github.com/repos/codingedward/ah-shakas/languages","stargazers_url":"https://api.github.com/repos/codingedward/ah-shakas/stargazers","contributors_url":"https://api.github.com/repos/codingedward/ah-shakas/contributors","subscribers_url":"https://api.github.com/repos/codingedward/ah-shakas/subscribers","subscription_url":"https://api.github.com/repos/codingedward/ah-shakas/subscription","commits_url":"https://api.github.com/repos/codingedward/ah-shakas/commits{/sha}","git_commits_url":"https://api.github.com/repos/codingedward/ah-shakas/git/commits{/sha}","comments_url":"https://api.github.com/repos/codingedward/ah-shakas/comments{/number}","issue_comment_url":"https://api.github.com/repos/codingedward/ah-shakas/issues/comments{/number}","contents_url":"https://api.github.com/repos/codingedward/ah-shakas/contents/{+path}","compare_url":"https://api.github.com/repos/codingedward/ah-shakas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codingedward/ah-shakas/merges","archive_url":"https://api.github.com/repos/codingedward/ah-shakas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codingedward/ah-shakas/downloads","issues_url":"https://api.github.com/repos/codingedward/ah-shakas/issues{/number}","pulls_url":"https://api.github.com/repos/codingedward/ah-shakas/pulls{/number}","milestones_url":"https://api.github.com/repos/codingedward/ah-shakas/milestones{/number}","notifications_url":"https://api.github.com/repos/codingedward/ah-shakas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codingedward/ah-shakas/labels{/name}","releases_url":"https://api.github.com/repos/codingedward/ah-shakas/releases{/id}","deployments_url":"https://api.github.com/repos/codingedward/ah-shakas/deployments","created_at":"2018-11-23T06:41:20Z","updated_at":"2018-11-23T08:22:41Z","pushed_at":"2018-11-29T01:09:45Z","git_url":"git://github.com/codingedward/ah-shakas.git","ssh_url":"git@github.com:codingedward/ah-shakas.git","clone_url":"https://github.com/codingedward/ah-shakas.git","svn_url":"https://github.com/codingedward/ah-shakas","homepage":null,"size":404,"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":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"ac945e4d9a888478307ed8ec4453d9cb34e0c6ba","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":149583220,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk1ODMyMjA=","name":"ah-shakas","full_name":"andela/ah-shakas","private":false,"owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/andela/ah-shakas","description":null,"fork":false,"url":"https://api.github.com/repos/andela/ah-shakas","forks_url":"https://api.github.com/repos/andela/ah-shakas/forks","keys_url":"https://api.github.com/repos/andela/ah-shakas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/ah-shakas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/ah-shakas/teams","hooks_url":"https://api.github.com/repos/andela/ah-shakas/hooks","issue_events_url":"https://api.github.com/repos/andela/ah-shakas/issues/events{/number}","events_url":"https://api.github.com/repos/andela/ah-shakas/events","assignees_url":"https://api.github.com/repos/andela/ah-shakas/assignees{/user}","branches_url":"https://api.github.com/repos/andela/ah-shakas/branches{/branch}","tags_url":"https://api.github.com/repos/andela/ah-shakas/tags","blobs_url":"https://api.github.com/repos/andela/ah-shakas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/ah-shakas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/ah-shakas/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/ah-shakas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/ah-shakas/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/ah-shakas/languages","stargazers_url":"https://api.github.com/repos/andela/ah-shakas/stargazers","contributors_url":"https://api.github.com/repos/andela/ah-shakas/contributors","subscribers_url":"https://api.github.com/repos/andela/ah-shakas/subscribers","subscription_url":"https://api.github.com/repos/andela/ah-shakas/subscription","commits_url":"https://api.github.com/repos/andela/ah-shakas/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/ah-shakas/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/ah-shakas/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/ah-shakas/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/ah-shakas/contents/{+path}","compare_url":"https://api.github.com/repos/andela/ah-shakas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/ah-shakas/merges","archive_url":"https://api.github.com/repos/andela/ah-shakas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/ah-shakas/downloads","issues_url":"https://api.github.com/repos/andela/ah-shakas/issues{/number}","pulls_url":"https://api.github.com/repos/andela/ah-shakas/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/ah-shakas/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/ah-shakas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/ah-shakas/labels{/name}","releases_url":"https://api.github.com/repos/andela/ah-shakas/releases{/id}","deployments_url":"https://api.github.com/repos/andela/ah-shakas/deployments","created_at":"2018-09-20T09:15:53Z","updated_at":"2018-11-28T14:40:33Z","pushed_at":"2018-11-28T14:40:34Z","git_url":"git://github.com/andela/ah-shakas.git","ssh_url":"git@github.com:andela/ah-shakas.git","clone_url":"https://github.com/andela/ah-shakas.git","svn_url":"https://github.com/andela/ah-shakas","homepage":null,"size":375,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"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":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/ah-shakas/pulls/52"},"html":{"href":"https://github.com/andela/ah-shakas/pull/52"},"issue":{"href":"https://api.github.com/repos/andela/ah-shakas/issues/52"},"comments":{"href":"https://api.github.com/repos/andela/ah-shakas/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/ah-shakas/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/ah-shakas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/ah-shakas/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/andela/ah-shakas/statuses/4ed9b89a2bda8015bfb60eb6890f0ebe2ddbcf8e"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":171,"deletions":123,"changed_files":11}}
{"actor":{"display_login":"codingedward"}}