{"action":"created","comment":{"url":"https://api.github.com/repos/ASCIT/donut/pulls/comments/231386574","pull_request_review_id":172347228,"id":231386574,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTM4NjU3NA==","diff_hunk":"@@ -237,12 +237,63 @@ def create_position_holder(pos_id, user_id, start_date, end_date):\n         start_date: Starting date of the holding period, format is 'yyyy-mm-dd'\n         end_date: end date of the hold period\n     '''\n-    s = \"\"\"INSERT INTO position_holders (pos_id, user_id, start_date, \n+    s = \"\"\"INSERT INTO position_holders (pos_id, user_id, start_date,\n     end_date) VALUES (%s, %s, %s, %s)\"\"\"\n     with flask.g.pymysql_db.cursor() as cursor:\n         cursor.execute(s, (pos_id, user_id, start_date, end_date))\n \n \n+def create_group(group_name,\n+                 group_desc=\"\",\n+                 group_type=\"\",\n+                 newsgroups=False,\n+                 anyone_can_send=False,\n+                 members_can_send=False,\n+                 visible=False,\n+                 admin_control_members=True):\n+    \"\"\"\n+    Creates a group with the given group_id, group name and other specifications\n+\n+    Arguments:\n+        group_name: The group name\n+        group_desc: Description of group (if there is any)\n+        group_type: Type of group\n+        newgroups: Toggles if group is a news group\n+        anyone_can_send: Toggles if anyone can send emails to this group\n+        memberse_can_send: Toggles if members can send emails to this group\n+        visible: Toggles if the group is visible\n+        admin_control_members: toggles if administrator can control membership\n+    \"\"\"\n+    fields = [\n+        \"group_name\", \"group_desc\", \"type\", \"newsgroups\", \"anyone_can_send\",\n+        \"members_can_send\", \"visible\", \"admin_control_members\"\n+    ]\n+    query = \"INSERT INTO groups (\" + ','.join(fields) + \")\"\\\n+        \"VALUES (%s, %s, %s, %r, %r, %r, %r, %r)\"","path":"donut/modules/groups/helpers.py","position":95,"original_position":95,"commit_id":"7431193e503190cceb0b97f69f13de250e4a3c90","original_commit_id":"7431193e503190cceb0b97f69f13de250e4a3c90","user":{"login":"calebsander","id":4256376,"node_id":"MDQ6VXNlcjQyNTYzNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4256376?v=4","gravatar_id":"","url":"https://api.github.com/users/calebsander","html_url":"https://github.com/calebsander","followers_url":"https://api.github.com/users/calebsander/followers","following_url":"https://api.github.com/users/calebsander/following{/other_user}","gists_url":"https://api.github.com/users/calebsander/gists{/gist_id}","starred_url":"https://api.github.com/users/calebsander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebsander/subscriptions","organizations_url":"https://api.github.com/users/calebsander/orgs","repos_url":"https://api.github.com/users/calebsander/repos","events_url":"https://api.github.com/users/calebsander/events{/privacy}","received_events_url":"https://api.github.com/users/calebsander/received_events","type":"User","site_admin":false},"body":"Is there a reason why these are not all `%s`?","created_at":"2018-11-07T05:47:18Z","updated_at":"2018-11-07T05:55:57Z","html_url":"https://github.com/ASCIT/donut/pull/88#discussion_r231386574","pull_request_url":"https://api.github.com/repos/ASCIT/donut/pulls/88","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/comments/231386574"},"html":{"href":"https://github.com/ASCIT/donut/pull/88#discussion_r231386574"},"pull_request":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/ASCIT/donut/pulls/88","id":228895902,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4ODk1OTAy","html_url":"https://github.com/ASCIT/donut/pull/88","diff_url":"https://github.com/ASCIT/donut/pull/88.diff","patch_url":"https://github.com/ASCIT/donut/pull/88.patch","issue_url":"https://api.github.com/repos/ASCIT/donut/issues/88","number":88,"state":"open","locked":false,"title":"Created Add Group and Delete Group helpers functions","user":{"login":"majesticfish","id":9868846,"node_id":"MDQ6VXNlcjk4Njg4NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/9868846?v=4","gravatar_id":"","url":"https://api.github.com/users/majesticfish","html_url":"https://github.com/majesticfish","followers_url":"https://api.github.com/users/majesticfish/followers","following_url":"https://api.github.com/users/majesticfish/following{/other_user}","gists_url":"https://api.github.com/users/majesticfish/gists{/gist_id}","starred_url":"https://api.github.com/users/majesticfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majesticfish/subscriptions","organizations_url":"https://api.github.com/users/majesticfish/orgs","repos_url":"https://api.github.com/users/majesticfish/repos","events_url":"https://api.github.com/users/majesticfish/events{/privacy}","received_events_url":"https://api.github.com/users/majesticfish/received_events","type":"User","site_admin":false},"body":"### Summary\r\n- Two new functions in modules/groups/helpers.py\r\n- helpers.create_group() creates a new group with specified attributes, also automatically creates a position associated with the group called \"Member\"\r\n- helpers.delete_group() removes a group and all its positions\r\n### Test Plan\r\n- Two new test cases for these methods\r\n","created_at":"2018-11-07T02:11:00Z","updated_at":"2018-11-07T05:55:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d650863b0bca293c4e9f2ad1a267a06be3df413","assignee":null,"assignees":[],"requested_reviewers":[{"login":"joshc","id":13230206,"node_id":"MDQ6VXNlcjEzMjMwMjA2","avatar_url":"https://avatars3.githubusercontent.com/u/13230206?v=4","gravatar_id":"","url":"https://api.github.com/users/joshc","html_url":"https://github.com/joshc","followers_url":"https://api.github.com/users/joshc/followers","following_url":"https://api.github.com/users/joshc/following{/other_user}","gists_url":"https://api.github.com/users/joshc/gists{/gist_id}","starred_url":"https://api.github.com/users/joshc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshc/subscriptions","organizations_url":"https://api.github.com/users/joshc/orgs","repos_url":"https://api.github.com/users/joshc/repos","events_url":"https://api.github.com/users/joshc/events{/privacy}","received_events_url":"https://api.github.com/users/joshc/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ASCIT/donut/pulls/88/commits","review_comments_url":"https://api.github.com/repos/ASCIT/donut/pulls/88/comments","review_comment_url":"https://api.github.com/repos/ASCIT/donut/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ASCIT/donut/issues/88/comments","statuses_url":"https://api.github.com/repos/ASCIT/donut/statuses/7431193e503190cceb0b97f69f13de250e4a3c90","head":{"label":"ASCIT:groups","ref":"groups","sha":"7431193e503190cceb0b97f69f13de250e4a3c90","user":{"login":"ASCIT","id":4779101,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NzkxMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4779101?v=4","gravatar_id":"","url":"https://api.github.com/users/ASCIT","html_url":"https://github.com/ASCIT","followers_url":"https://api.github.com/users/ASCIT/followers","following_url":"https://api.github.com/users/ASCIT/following{/other_user}","gists_url":"https://api.github.com/users/ASCIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ASCIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASCIT/subscriptions","organizations_url":"https://api.github.com/users/ASCIT/orgs","repos_url":"https://api.github.com/users/ASCIT/repos","events_url":"https://api.github.com/users/ASCIT/events{/privacy}","received_events_url":"https://api.github.com/users/ASCIT/received_events","type":"Organization","site_admin":false},"repo":{"id":30130017,"node_id":"MDEwOlJlcG9zaXRvcnkzMDEzMDAxNw==","name":"donut","full_name":"ASCIT/donut","private":false,"owner":{"login":"ASCIT","id":4779101,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NzkxMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4779101?v=4","gravatar_id":"","url":"https://api.github.com/users/ASCIT","html_url":"https://github.com/ASCIT","followers_url":"https://api.github.com/users/ASCIT/followers","following_url":"https://api.github.com/users/ASCIT/following{/other_user}","gists_url":"https://api.github.com/users/ASCIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ASCIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASCIT/subscriptions","organizations_url":"https://api.github.com/users/ASCIT/orgs","repos_url":"https://api.github.com/users/ASCIT/repos","events_url":"https://api.github.com/users/ASCIT/events{/privacy}","received_events_url":"https://api.github.com/users/ASCIT/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ASCIT/donut","description":"The repository for Donut.","fork":false,"url":"https://api.github.com/repos/ASCIT/donut","forks_url":"https://api.github.com/repos/ASCIT/donut/forks","keys_url":"https://api.github.com/repos/ASCIT/donut/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ASCIT/donut/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ASCIT/donut/teams","hooks_url":"https://api.github.com/repos/ASCIT/donut/hooks","issue_events_url":"https://api.github.com/repos/ASCIT/donut/issues/events{/number}","events_url":"https://api.github.com/repos/ASCIT/donut/events","assignees_url":"https://api.github.com/repos/ASCIT/donut/assignees{/user}","branches_url":"https://api.github.com/repos/ASCIT/donut/branches{/branch}","tags_url":"https://api.github.com/repos/ASCIT/donut/tags","blobs_url":"https://api.github.com/repos/ASCIT/donut/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ASCIT/donut/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ASCIT/donut/git/refs{/sha}","trees_url":"https://api.github.com/repos/ASCIT/donut/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ASCIT/donut/statuses/{sha}","languages_url":"https://api.github.com/repos/ASCIT/donut/languages","stargazers_url":"https://api.github.com/repos/ASCIT/donut/stargazers","contributors_url":"https://api.github.com/repos/ASCIT/donut/contributors","subscribers_url":"https://api.github.com/repos/ASCIT/donut/subscribers","subscription_url":"https://api.github.com/repos/ASCIT/donut/subscription","commits_url":"https://api.github.com/repos/ASCIT/donut/commits{/sha}","git_commits_url":"https://api.github.com/repos/ASCIT/donut/git/commits{/sha}","comments_url":"https://api.github.com/repos/ASCIT/donut/comments{/number}","issue_comment_url":"https://api.github.com/repos/ASCIT/donut/issues/comments{/number}","contents_url":"https://api.github.com/repos/ASCIT/donut/contents/{+path}","compare_url":"https://api.github.com/repos/ASCIT/donut/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ASCIT/donut/merges","archive_url":"https://api.github.com/repos/ASCIT/donut/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ASCIT/donut/downloads","issues_url":"https://api.github.com/repos/ASCIT/donut/issues{/number}","pulls_url":"https://api.github.com/repos/ASCIT/donut/pulls{/number}","milestones_url":"https://api.github.com/repos/ASCIT/donut/milestones{/number}","notifications_url":"https://api.github.com/repos/ASCIT/donut/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ASCIT/donut/labels{/name}","releases_url":"https://api.github.com/repos/ASCIT/donut/releases{/id}","deployments_url":"https://api.github.com/repos/ASCIT/donut/deployments","created_at":"2015-01-31T23:24:44Z","updated_at":"2018-10-31T00:59:43Z","pushed_at":"2018-11-07T02:14:44Z","git_url":"git://github.com/ASCIT/donut.git","ssh_url":"git@github.com:ASCIT/donut.git","clone_url":"https://github.com/ASCIT/donut.git","svn_url":"https://github.com/ASCIT/donut","homepage":null,"size":46332,"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":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":10,"watchers":1,"default_branch":"master"}},"base":{"label":"ASCIT:master","ref":"master","sha":"ca0b53d88670172a5324cecb4e20e1e389429353","user":{"login":"ASCIT","id":4779101,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NzkxMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4779101?v=4","gravatar_id":"","url":"https://api.github.com/users/ASCIT","html_url":"https://github.com/ASCIT","followers_url":"https://api.github.com/users/ASCIT/followers","following_url":"https://api.github.com/users/ASCIT/following{/other_user}","gists_url":"https://api.github.com/users/ASCIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ASCIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASCIT/subscriptions","organizations_url":"https://api.github.com/users/ASCIT/orgs","repos_url":"https://api.github.com/users/ASCIT/repos","events_url":"https://api.github.com/users/ASCIT/events{/privacy}","received_events_url":"https://api.github.com/users/ASCIT/received_events","type":"Organization","site_admin":false},"repo":{"id":30130017,"node_id":"MDEwOlJlcG9zaXRvcnkzMDEzMDAxNw==","name":"donut","full_name":"ASCIT/donut","private":false,"owner":{"login":"ASCIT","id":4779101,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NzkxMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4779101?v=4","gravatar_id":"","url":"https://api.github.com/users/ASCIT","html_url":"https://github.com/ASCIT","followers_url":"https://api.github.com/users/ASCIT/followers","following_url":"https://api.github.com/users/ASCIT/following{/other_user}","gists_url":"https://api.github.com/users/ASCIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ASCIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASCIT/subscriptions","organizations_url":"https://api.github.com/users/ASCIT/orgs","repos_url":"https://api.github.com/users/ASCIT/repos","events_url":"https://api.github.com/users/ASCIT/events{/privacy}","received_events_url":"https://api.github.com/users/ASCIT/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ASCIT/donut","description":"The repository for Donut.","fork":false,"url":"https://api.github.com/repos/ASCIT/donut","forks_url":"https://api.github.com/repos/ASCIT/donut/forks","keys_url":"https://api.github.com/repos/ASCIT/donut/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ASCIT/donut/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ASCIT/donut/teams","hooks_url":"https://api.github.com/repos/ASCIT/donut/hooks","issue_events_url":"https://api.github.com/repos/ASCIT/donut/issues/events{/number}","events_url":"https://api.github.com/repos/ASCIT/donut/events","assignees_url":"https://api.github.com/repos/ASCIT/donut/assignees{/user}","branches_url":"https://api.github.com/repos/ASCIT/donut/branches{/branch}","tags_url":"https://api.github.com/repos/ASCIT/donut/tags","blobs_url":"https://api.github.com/repos/ASCIT/donut/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ASCIT/donut/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ASCIT/donut/git/refs{/sha}","trees_url":"https://api.github.com/repos/ASCIT/donut/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ASCIT/donut/statuses/{sha}","languages_url":"https://api.github.com/repos/ASCIT/donut/languages","stargazers_url":"https://api.github.com/repos/ASCIT/donut/stargazers","contributors_url":"https://api.github.com/repos/ASCIT/donut/contributors","subscribers_url":"https://api.github.com/repos/ASCIT/donut/subscribers","subscription_url":"https://api.github.com/repos/ASCIT/donut/subscription","commits_url":"https://api.github.com/repos/ASCIT/donut/commits{/sha}","git_commits_url":"https://api.github.com/repos/ASCIT/donut/git/commits{/sha}","comments_url":"https://api.github.com/repos/ASCIT/donut/comments{/number}","issue_comment_url":"https://api.github.com/repos/ASCIT/donut/issues/comments{/number}","contents_url":"https://api.github.com/repos/ASCIT/donut/contents/{+path}","compare_url":"https://api.github.com/repos/ASCIT/donut/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ASCIT/donut/merges","archive_url":"https://api.github.com/repos/ASCIT/donut/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ASCIT/donut/downloads","issues_url":"https://api.github.com/repos/ASCIT/donut/issues{/number}","pulls_url":"https://api.github.com/repos/ASCIT/donut/pulls{/number}","milestones_url":"https://api.github.com/repos/ASCIT/donut/milestones{/number}","notifications_url":"https://api.github.com/repos/ASCIT/donut/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ASCIT/donut/labels{/name}","releases_url":"https://api.github.com/repos/ASCIT/donut/releases{/id}","deployments_url":"https://api.github.com/repos/ASCIT/donut/deployments","created_at":"2015-01-31T23:24:44Z","updated_at":"2018-10-31T00:59:43Z","pushed_at":"2018-11-07T02:14:44Z","git_url":"git://github.com/ASCIT/donut.git","ssh_url":"git@github.com:ASCIT/donut.git","clone_url":"https://github.com/ASCIT/donut.git","svn_url":"https://github.com/ASCIT/donut","homepage":null,"size":46332,"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":1,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/88"},"html":{"href":"https://github.com/ASCIT/donut/pull/88"},"issue":{"href":"https://api.github.com/repos/ASCIT/donut/issues/88"},"comments":{"href":"https://api.github.com/repos/ASCIT/donut/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ASCIT/donut/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/ASCIT/donut/statuses/7431193e503190cceb0b97f69f13de250e4a3c90"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"calebsander"}}