{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments/193294584","pull_request_review_id":126236460,"id":193294584,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzI5NDU4NA==","diff_hunk":"@@ -3342,10 +3355,7 @@ def stripe_authorization_post(transaction):\n     :param transaction:\n     :return:\n     \"\"\"\n-    with stash['app'].app_context():\n-        event = EventFactoryBasic()\n-        db.session.add(event)\n-        db.session.commit()\n+    transaction['skip'] = True","path":"tests/hook_main.py","position":28,"original_position":28,"commit_id":"e7768901938f91bd01306bd2a8085c269bc4eb68","original_commit_id":"e7768901938f91bd01306bd2a8085c269bc4eb68","user":{"login":"mayank8318","id":22395998,"node_id":"MDQ6VXNlcjIyMzk1OTk4","avatar_url":"https://avatars0.githubusercontent.com/u/22395998?v=4","gravatar_id":"","url":"https://api.github.com/users/mayank8318","html_url":"https://github.com/mayank8318","followers_url":"https://api.github.com/users/mayank8318/followers","following_url":"https://api.github.com/users/mayank8318/following{/other_user}","gists_url":"https://api.github.com/users/mayank8318/gists{/gist_id}","starred_url":"https://api.github.com/users/mayank8318/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayank8318/subscriptions","organizations_url":"https://api.github.com/users/mayank8318/orgs","repos_url":"https://api.github.com/users/mayank8318/repos","events_url":"https://api.github.com/users/mayank8318/events{/privacy}","received_events_url":"https://api.github.com/users/mayank8318/received_events","type":"User","site_admin":false},"body":"Why change this?","created_at":"2018-06-06T05:22:37Z","updated_at":"2018-06-06T05:22:42Z","html_url":"https://github.com/fossasia/open-event-server/pull/4807#discussion_r193294584","pull_request_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments/193294584"},"html":{"href":"https://github.com/fossasia/open-event-server/pull/4807#discussion_r193294584"},"pull_request":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807","id":190786779,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwNzg2Nzc5","html_url":"https://github.com/fossasia/open-event-server/pull/4807","diff_url":"https://github.com/fossasia/open-event-server/pull/4807.diff","patch_url":"https://github.com/fossasia/open-event-server/pull/4807.patch","issue_url":"https://api.github.com/repos/fossasia/open-event-server/issues/4807","number":4807,"state":"open","locked":false,"title":"fix: Correct the behaviour of Stripe endpoint and add relationship with Event","user":{"login":"srv-twry","id":21277837,"node_id":"MDQ6VXNlcjIxMjc3ODM3","avatar_url":"https://avatars3.githubusercontent.com/u/21277837?v=4","gravatar_id":"","url":"https://api.github.com/users/srv-twry","html_url":"https://github.com/srv-twry","followers_url":"https://api.github.com/users/srv-twry/followers","following_url":"https://api.github.com/users/srv-twry/following{/other_user}","gists_url":"https://api.github.com/users/srv-twry/gists{/gist_id}","starred_url":"https://api.github.com/users/srv-twry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srv-twry/subscriptions","organizations_url":"https://api.github.com/users/srv-twry/orgs","repos_url":"https://api.github.com/users/srv-twry/repos","events_url":"https://api.github.com/users/srv-twry/events{/privacy}","received_events_url":"https://api.github.com/users/srv-twry/received_events","type":"User","site_admin":false},"body":"<!--\r\n(Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.)\r\n-->\r\n<!-- Add the issue number that is fixed by this PR (In the form Fixes #123) -->\r\n\r\nFixes #4805 \r\n\r\n#### Checklist\r\n\r\n- [x] I have read the [Contribution & Best practices Guide](https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia) and my PR follows them.\r\n- [x] My branch is up-to-date with the Upstream `development` branch.\r\n- [ ] The unit tests pass locally with my changes <!-- use `nosetests tests/unittests` to run all the tests -->\r\n- [ ] I have added tests that prove my fix is effective or that my feature works\r\n- [x] I have added necessary documentation (if appropriate)\r\n<!-- If an existing function does not have a docstring, please add one -->\r\n- [x] All the functions created/modified in this PR contain relevant docstrings.\r\n\r\n#### Short description of what this resolves:\r\nFixes the wrong behaviour of the Stripe Authorization endpoint. \r\nEndpoint takes in the ```code``` and uses it to fetch other details like ```secret_key``` from Stripe. \r\nAdds one-one relationship with Event\r\n\r\n#### Changes proposed in this pull request:\r\n1. Deleted fields from schema which aren't required.\r\n2. Made stripe_publishable_key Read only.\r\n3. Made code Write only.\r\n4. Added relationship with Event.\r\n5. Disallows two StripeAuthorization objects on one event.\r\n6. Disallows Stripe Authorization object if stripe payment is disabled.\r\n7. Fetches the other details from Stripe using the code.\r\n8. Updated the docs.","created_at":"2018-05-27T13:08:53Z","updated_at":"2018-06-06T05:22:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fd058b9c0c52800ff7673d52b10ac73b284f432","assignee":{"login":"srv-twry","id":21277837,"node_id":"MDQ6VXNlcjIxMjc3ODM3","avatar_url":"https://avatars3.githubusercontent.com/u/21277837?v=4","gravatar_id":"","url":"https://api.github.com/users/srv-twry","html_url":"https://github.com/srv-twry","followers_url":"https://api.github.com/users/srv-twry/followers","following_url":"https://api.github.com/users/srv-twry/following{/other_user}","gists_url":"https://api.github.com/users/srv-twry/gists{/gist_id}","starred_url":"https://api.github.com/users/srv-twry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srv-twry/subscriptions","organizations_url":"https://api.github.com/users/srv-twry/orgs","repos_url":"https://api.github.com/users/srv-twry/repos","events_url":"https://api.github.com/users/srv-twry/events{/privacy}","received_events_url":"https://api.github.com/users/srv-twry/received_events","type":"User","site_admin":false},"assignees":[{"login":"srv-twry","id":21277837,"node_id":"MDQ6VXNlcjIxMjc3ODM3","avatar_url":"https://avatars3.githubusercontent.com/u/21277837?v=4","gravatar_id":"","url":"https://api.github.com/users/srv-twry","html_url":"https://github.com/srv-twry","followers_url":"https://api.github.com/users/srv-twry/followers","following_url":"https://api.github.com/users/srv-twry/following{/other_user}","gists_url":"https://api.github.com/users/srv-twry/gists{/gist_id}","starred_url":"https://api.github.com/users/srv-twry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srv-twry/subscriptions","organizations_url":"https://api.github.com/users/srv-twry/orgs","repos_url":"https://api.github.com/users/srv-twry/repos","events_url":"https://api.github.com/users/srv-twry/events{/privacy}","received_events_url":"https://api.github.com/users/srv-twry/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":634334822,"node_id":"MDU6TGFiZWw2MzQzMzQ4MjI=","url":"https://api.github.com/repos/fossasia/open-event-server/labels/needs-review","name":"needs-review","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807/commits","review_comments_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807/comments","review_comment_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossasia/open-event-server/issues/4807/comments","statuses_url":"https://api.github.com/repos/fossasia/open-event-server/statuses/e7768901938f91bd01306bd2a8085c269bc4eb68","head":{"label":"srv-twry:stripe_endpoint","ref":"stripe_endpoint","sha":"e7768901938f91bd01306bd2a8085c269bc4eb68","user":{"login":"srv-twry","id":21277837,"node_id":"MDQ6VXNlcjIxMjc3ODM3","avatar_url":"https://avatars3.githubusercontent.com/u/21277837?v=4","gravatar_id":"","url":"https://api.github.com/users/srv-twry","html_url":"https://github.com/srv-twry","followers_url":"https://api.github.com/users/srv-twry/followers","following_url":"https://api.github.com/users/srv-twry/following{/other_user}","gists_url":"https://api.github.com/users/srv-twry/gists{/gist_id}","starred_url":"https://api.github.com/users/srv-twry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srv-twry/subscriptions","organizations_url":"https://api.github.com/users/srv-twry/orgs","repos_url":"https://api.github.com/users/srv-twry/repos","events_url":"https://api.github.com/users/srv-twry/events{/privacy}","received_events_url":"https://api.github.com/users/srv-twry/received_events","type":"User","site_admin":false},"repo":{"id":129691428,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk2OTE0Mjg=","name":"open-event-server","full_name":"srv-twry/open-event-server","owner":{"login":"srv-twry","id":21277837,"node_id":"MDQ6VXNlcjIxMjc3ODM3","avatar_url":"https://avatars3.githubusercontent.com/u/21277837?v=4","gravatar_id":"","url":"https://api.github.com/users/srv-twry","html_url":"https://github.com/srv-twry","followers_url":"https://api.github.com/users/srv-twry/followers","following_url":"https://api.github.com/users/srv-twry/following{/other_user}","gists_url":"https://api.github.com/users/srv-twry/gists{/gist_id}","starred_url":"https://api.github.com/users/srv-twry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srv-twry/subscriptions","organizations_url":"https://api.github.com/users/srv-twry/orgs","repos_url":"https://api.github.com/users/srv-twry/repos","events_url":"https://api.github.com/users/srv-twry/events{/privacy}","received_events_url":"https://api.github.com/users/srv-twry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srv-twry/open-event-server","description":"The Open Event Organizer Server to Manage Events","fork":true,"url":"https://api.github.com/repos/srv-twry/open-event-server","forks_url":"https://api.github.com/repos/srv-twry/open-event-server/forks","keys_url":"https://api.github.com/repos/srv-twry/open-event-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srv-twry/open-event-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srv-twry/open-event-server/teams","hooks_url":"https://api.github.com/repos/srv-twry/open-event-server/hooks","issue_events_url":"https://api.github.com/repos/srv-twry/open-event-server/issues/events{/number}","events_url":"https://api.github.com/repos/srv-twry/open-event-server/events","assignees_url":"https://api.github.com/repos/srv-twry/open-event-server/assignees{/user}","branches_url":"https://api.github.com/repos/srv-twry/open-event-server/branches{/branch}","tags_url":"https://api.github.com/repos/srv-twry/open-event-server/tags","blobs_url":"https://api.github.com/repos/srv-twry/open-event-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srv-twry/open-event-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srv-twry/open-event-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/srv-twry/open-event-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srv-twry/open-event-server/statuses/{sha}","languages_url":"https://api.github.com/repos/srv-twry/open-event-server/languages","stargazers_url":"https://api.github.com/repos/srv-twry/open-event-server/stargazers","contributors_url":"https://api.github.com/repos/srv-twry/open-event-server/contributors","subscribers_url":"https://api.github.com/repos/srv-twry/open-event-server/subscribers","subscription_url":"https://api.github.com/repos/srv-twry/open-event-server/subscription","commits_url":"https://api.github.com/repos/srv-twry/open-event-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/srv-twry/open-event-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/srv-twry/open-event-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/srv-twry/open-event-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/srv-twry/open-event-server/contents/{+path}","compare_url":"https://api.github.com/repos/srv-twry/open-event-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srv-twry/open-event-server/merges","archive_url":"https://api.github.com/repos/srv-twry/open-event-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srv-twry/open-event-server/downloads","issues_url":"https://api.github.com/repos/srv-twry/open-event-server/issues{/number}","pulls_url":"https://api.github.com/repos/srv-twry/open-event-server/pulls{/number}","milestones_url":"https://api.github.com/repos/srv-twry/open-event-server/milestones{/number}","notifications_url":"https://api.github.com/repos/srv-twry/open-event-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srv-twry/open-event-server/labels{/name}","releases_url":"https://api.github.com/repos/srv-twry/open-event-server/releases{/id}","deployments_url":"https://api.github.com/repos/srv-twry/open-event-server/deployments","created_at":"2018-04-16T05:52:19Z","updated_at":"2018-06-05T21:51:18Z","pushed_at":"2018-06-05T21:51:46Z","git_url":"git://github.com/srv-twry/open-event-server.git","ssh_url":"git@github.com:srv-twry/open-event-server.git","clone_url":"https://github.com/srv-twry/open-event-server.git","svn_url":"https://github.com/srv-twry/open-event-server","homepage":"http://open-event-api.herokuapp.com/","size":44403,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"fossasia:development","ref":"development","sha":"255e274a3137279ddecdd0b76238281685f62f49","user":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"repo":{"id":35270176,"node_id":"MDEwOlJlcG9zaXRvcnkzNTI3MDE3Ng==","name":"open-event-server","full_name":"fossasia/open-event-server","owner":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fossasia/open-event-server","description":"The Open Event Organizer Server to Manage Events","fork":false,"url":"https://api.github.com/repos/fossasia/open-event-server","forks_url":"https://api.github.com/repos/fossasia/open-event-server/forks","keys_url":"https://api.github.com/repos/fossasia/open-event-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossasia/open-event-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossasia/open-event-server/teams","hooks_url":"https://api.github.com/repos/fossasia/open-event-server/hooks","issue_events_url":"https://api.github.com/repos/fossasia/open-event-server/issues/events{/number}","events_url":"https://api.github.com/repos/fossasia/open-event-server/events","assignees_url":"https://api.github.com/repos/fossasia/open-event-server/assignees{/user}","branches_url":"https://api.github.com/repos/fossasia/open-event-server/branches{/branch}","tags_url":"https://api.github.com/repos/fossasia/open-event-server/tags","blobs_url":"https://api.github.com/repos/fossasia/open-event-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossasia/open-event-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossasia/open-event-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossasia/open-event-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossasia/open-event-server/statuses/{sha}","languages_url":"https://api.github.com/repos/fossasia/open-event-server/languages","stargazers_url":"https://api.github.com/repos/fossasia/open-event-server/stargazers","contributors_url":"https://api.github.com/repos/fossasia/open-event-server/contributors","subscribers_url":"https://api.github.com/repos/fossasia/open-event-server/subscribers","subscription_url":"https://api.github.com/repos/fossasia/open-event-server/subscription","commits_url":"https://api.github.com/repos/fossasia/open-event-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossasia/open-event-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossasia/open-event-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossasia/open-event-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossasia/open-event-server/contents/{+path}","compare_url":"https://api.github.com/repos/fossasia/open-event-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossasia/open-event-server/merges","archive_url":"https://api.github.com/repos/fossasia/open-event-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossasia/open-event-server/downloads","issues_url":"https://api.github.com/repos/fossasia/open-event-server/issues{/number}","pulls_url":"https://api.github.com/repos/fossasia/open-event-server/pulls{/number}","milestones_url":"https://api.github.com/repos/fossasia/open-event-server/milestones{/number}","notifications_url":"https://api.github.com/repos/fossasia/open-event-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossasia/open-event-server/labels{/name}","releases_url":"https://api.github.com/repos/fossasia/open-event-server/releases{/id}","deployments_url":"https://api.github.com/repos/fossasia/open-event-server/deployments","created_at":"2015-05-08T09:16:19Z","updated_at":"2018-06-05T21:45:45Z","pushed_at":"2018-06-05T23:41:53Z","git_url":"git://github.com/fossasia/open-event-server.git","ssh_url":"git@github.com:fossasia/open-event-server.git","clone_url":"https://github.com/fossasia/open-event-server.git","svn_url":"https://github.com/fossasia/open-event-server","homepage":"http://open-event-api.herokuapp.com/","size":44380,"stargazers_count":1010,"watchers_count":1010,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":913,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":913,"open_issues":88,"watchers":1010,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807"},"html":{"href":"https://github.com/fossasia/open-event-server/pull/4807"},"issue":{"href":"https://api.github.com/repos/fossasia/open-event-server/issues/4807"},"comments":{"href":"https://api.github.com/repos/fossasia/open-event-server/issues/4807/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807/comments"},"review_comment":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/4807/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/open-event-server/statuses/e7768901938f91bd01306bd2a8085c269bc4eb68"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mayank8318"}}