{"action":"created","comment":{"url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments/208794704","pull_request_review_id":144676761,"id":208794704,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODc5NDcwNA==","diff_hunk":"@@ -0,0 +1,175 @@\n+#Room Reservation program to be used on csv file with fields: ID, timestamp, date, time, roomID, content (as in attendance.ftta.lan db)\n+from datetime import *\n+from django.core.management.base import BaseCommand\n+from room_reservations.models import RoomReservation\n+from rooms.models import Room\n+from accounts.models import User\n+import os\n+\n+class Command(BaseCommand):\n+  # to use: python ap/manage.py rr_script --settings=ap.settings.dev\n+\n+  def roomlist(self):\n+    return {\"26\":\"MC\",\"45\":\"NE3\",\"92\":\"SW120\",\"93\":\"NW201\",\"94\":\"NE209\",\"95\":\"NE210\",\"96\":\"NE212\",\"97\":\"NE213\",\"98\":\"NE215\",\"99\":\"NE216\",\"100\":\"NE217\",\"101\":\"NE218\",\"102\":\"NE219\",\"103\":\"NE220\",\"104\":\"NE221\",\"105\":\"NE222\",\"106\":\"NE223\",\"107\":\"NE224\",\"108\":\"NE225\",\"109\":\"SE238\",\"110\":\"SE239\",\"111\":\"SE240\",\"112\":\"SE241\",\"113\":\"SE242\",\"114\":\"SE243\",\"115\":\"SE244\",\"116\":\"SE245\",\"117\":\"NW108\",\"119\":\"SW227\",\"120\":\"SE131\",\"121\":\"SW229\",\"122\":\"SE132\",\"124\":\"SE133\"}\n+\n+  def read_file(self, file_name):\n+    if file_name == '':\n+      file_name = os.path.expanduser('~/workspace/djattendance/ap/room_reservations/management/commands/roomschedule.csv')\n+    current = open(file_name,'r')\n+    result = current.read().split('\\n')\n+    current.close()\n+    return result\n+  \n+  def parse(self, csv):\n+    result = []\n+    for each in csv:\n+      temp = []\n+      for part in each.split(','):\n+        temp.append(part.strip('\"'))\n+      result.append(temp)\n+    return result\n+  \n+  def get_id(self, event):","path":"ap/room_reservations/management/commands/rr_script.py","position":32,"original_position":32,"commit_id":"0aaadd9b634af5cada52ede792b9013796615963","original_commit_id":"0aaadd9b634af5cada52ede792b9013796615963","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Method could be a function](https://app.codacy.com/app/jontey/djattendance/pullRequest?prid=2019167)","created_at":"2018-08-09T03:02:37Z","updated_at":"2018-08-09T03:02:37Z","html_url":"https://github.com/attendanceproject/djattendance/pull/1326#discussion_r208794704","pull_request_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments/208794704"},"html":{"href":"https://github.com/attendanceproject/djattendance/pull/1326#discussion_r208794704"},"pull_request":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326"}}},"pull_request":{"url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326","id":207187141,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTg3MTQx","html_url":"https://github.com/attendanceproject/djattendance/pull/1326","diff_url":"https://github.com/attendanceproject/djattendance/pull/1326.diff","patch_url":"https://github.com/attendanceproject/djattendance/pull/1326.patch","issue_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/1326","number":1326,"state":"open","locked":false,"title":"Room Reservation import script for Fall 2018","user":{"login":"zioninzion","id":18160083,"node_id":"MDQ6VXNlcjE4MTYwMDgz","avatar_url":"https://avatars3.githubusercontent.com/u/18160083?v=4","gravatar_id":"","url":"https://api.github.com/users/zioninzion","html_url":"https://github.com/zioninzion","followers_url":"https://api.github.com/users/zioninzion/followers","following_url":"https://api.github.com/users/zioninzion/following{/other_user}","gists_url":"https://api.github.com/users/zioninzion/gists{/gist_id}","starred_url":"https://api.github.com/users/zioninzion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zioninzion/subscriptions","organizations_url":"https://api.github.com/users/zioninzion/orgs","repos_url":"https://api.github.com/users/zioninzion/repos","events_url":"https://api.github.com/users/zioninzion/events{/privacy}","received_events_url":"https://api.github.com/users/zioninzion/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-09T03:00:13Z","updated_at":"2018-08-09T03:02:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeaa060a971d1c43b22b74f9b67adce44c97eb33","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326/commits","review_comments_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326/comments","review_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/1326/comments","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/0aaadd9b634af5cada52ede792b9013796615963","head":{"label":"attendanceproject:res_import","ref":"res_import","sha":"0aaadd9b634af5cada52ede792b9013796615963","user":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"repo":{"id":11232995,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMjk5NQ==","name":"djattendance","full_name":"attendanceproject/djattendance","owner":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/attendanceproject/djattendance","description":"A rewrite of the original attendance project in Python","fork":false,"url":"https://api.github.com/repos/attendanceproject/djattendance","forks_url":"https://api.github.com/repos/attendanceproject/djattendance/forks","keys_url":"https://api.github.com/repos/attendanceproject/djattendance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/attendanceproject/djattendance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/attendanceproject/djattendance/teams","hooks_url":"https://api.github.com/repos/attendanceproject/djattendance/hooks","issue_events_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/events{/number}","events_url":"https://api.github.com/repos/attendanceproject/djattendance/events","assignees_url":"https://api.github.com/repos/attendanceproject/djattendance/assignees{/user}","branches_url":"https://api.github.com/repos/attendanceproject/djattendance/branches{/branch}","tags_url":"https://api.github.com/repos/attendanceproject/djattendance/tags","blobs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/attendanceproject/djattendance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/refs{/sha}","trees_url":"https://api.github.com/repos/attendanceproject/djattendance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/{sha}","languages_url":"https://api.github.com/repos/attendanceproject/djattendance/languages","stargazers_url":"https://api.github.com/repos/attendanceproject/djattendance/stargazers","contributors_url":"https://api.github.com/repos/attendanceproject/djattendance/contributors","subscribers_url":"https://api.github.com/repos/attendanceproject/djattendance/subscribers","subscription_url":"https://api.github.com/repos/attendanceproject/djattendance/subscription","commits_url":"https://api.github.com/repos/attendanceproject/djattendance/commits{/sha}","git_commits_url":"https://api.github.com/repos/attendanceproject/djattendance/git/commits{/sha}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/comments{/number}","issue_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/comments{/number}","contents_url":"https://api.github.com/repos/attendanceproject/djattendance/contents/{+path}","compare_url":"https://api.github.com/repos/attendanceproject/djattendance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/attendanceproject/djattendance/merges","archive_url":"https://api.github.com/repos/attendanceproject/djattendance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/attendanceproject/djattendance/downloads","issues_url":"https://api.github.com/repos/attendanceproject/djattendance/issues{/number}","pulls_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls{/number}","milestones_url":"https://api.github.com/repos/attendanceproject/djattendance/milestones{/number}","notifications_url":"https://api.github.com/repos/attendanceproject/djattendance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/attendanceproject/djattendance/labels{/name}","releases_url":"https://api.github.com/repos/attendanceproject/djattendance/releases{/id}","deployments_url":"https://api.github.com/repos/attendanceproject/djattendance/deployments","created_at":"2013-07-07T12:16:10Z","updated_at":"2018-08-08T17:48:45Z","pushed_at":"2018-08-09T03:00:13Z","git_url":"git://github.com/attendanceproject/djattendance.git","ssh_url":"git@github.com:attendanceproject/djattendance.git","clone_url":"https://github.com/attendanceproject/djattendance.git","svn_url":"https://github.com/attendanceproject/djattendance","homepage":"","size":186196,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":109,"license":null,"forks":17,"open_issues":109,"watchers":27,"default_branch":"dev"}},"base":{"label":"attendanceproject:dev","ref":"dev","sha":"3cee97f6d6af3fd150c0afb7e60eab5e36d93153","user":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"repo":{"id":11232995,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMjk5NQ==","name":"djattendance","full_name":"attendanceproject/djattendance","owner":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/attendanceproject/djattendance","description":"A rewrite of the original attendance project in Python","fork":false,"url":"https://api.github.com/repos/attendanceproject/djattendance","forks_url":"https://api.github.com/repos/attendanceproject/djattendance/forks","keys_url":"https://api.github.com/repos/attendanceproject/djattendance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/attendanceproject/djattendance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/attendanceproject/djattendance/teams","hooks_url":"https://api.github.com/repos/attendanceproject/djattendance/hooks","issue_events_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/events{/number}","events_url":"https://api.github.com/repos/attendanceproject/djattendance/events","assignees_url":"https://api.github.com/repos/attendanceproject/djattendance/assignees{/user}","branches_url":"https://api.github.com/repos/attendanceproject/djattendance/branches{/branch}","tags_url":"https://api.github.com/repos/attendanceproject/djattendance/tags","blobs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/attendanceproject/djattendance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/refs{/sha}","trees_url":"https://api.github.com/repos/attendanceproject/djattendance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/{sha}","languages_url":"https://api.github.com/repos/attendanceproject/djattendance/languages","stargazers_url":"https://api.github.com/repos/attendanceproject/djattendance/stargazers","contributors_url":"https://api.github.com/repos/attendanceproject/djattendance/contributors","subscribers_url":"https://api.github.com/repos/attendanceproject/djattendance/subscribers","subscription_url":"https://api.github.com/repos/attendanceproject/djattendance/subscription","commits_url":"https://api.github.com/repos/attendanceproject/djattendance/commits{/sha}","git_commits_url":"https://api.github.com/repos/attendanceproject/djattendance/git/commits{/sha}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/comments{/number}","issue_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/comments{/number}","contents_url":"https://api.github.com/repos/attendanceproject/djattendance/contents/{+path}","compare_url":"https://api.github.com/repos/attendanceproject/djattendance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/attendanceproject/djattendance/merges","archive_url":"https://api.github.com/repos/attendanceproject/djattendance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/attendanceproject/djattendance/downloads","issues_url":"https://api.github.com/repos/attendanceproject/djattendance/issues{/number}","pulls_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls{/number}","milestones_url":"https://api.github.com/repos/attendanceproject/djattendance/milestones{/number}","notifications_url":"https://api.github.com/repos/attendanceproject/djattendance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/attendanceproject/djattendance/labels{/name}","releases_url":"https://api.github.com/repos/attendanceproject/djattendance/releases{/id}","deployments_url":"https://api.github.com/repos/attendanceproject/djattendance/deployments","created_at":"2013-07-07T12:16:10Z","updated_at":"2018-08-08T17:48:45Z","pushed_at":"2018-08-09T03:00:13Z","git_url":"git://github.com/attendanceproject/djattendance.git","ssh_url":"git@github.com:attendanceproject/djattendance.git","clone_url":"https://github.com/attendanceproject/djattendance.git","svn_url":"https://github.com/attendanceproject/djattendance","homepage":"","size":186196,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":109,"license":null,"forks":17,"open_issues":109,"watchers":27,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326"},"html":{"href":"https://github.com/attendanceproject/djattendance/pull/1326"},"issue":{"href":"https://api.github.com/repos/attendanceproject/djattendance/issues/1326"},"comments":{"href":"https://api.github.com/repos/attendanceproject/djattendance/issues/1326/comments"},"review_comments":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326/comments"},"review_comment":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/1326/commits"},"statuses":{"href":"https://api.github.com/repos/attendanceproject/djattendance/statuses/0aaadd9b634af5cada52ede792b9013796615963"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}