{"action":"created","comment":{"url":"https://api.github.com/repos/uclapi/uclapi/pulls/comments/155218543","pull_request_review_id":81499793,"id":155218543,"diff_hunk":"@@ -2,20 +2,21 @@\n import os\n from distutils.util import strtobool\n \n+import redis\n+\n from django.core.exceptions import ObjectDoesNotExist\n from django.core.serializers.json import DjangoJSONEncoder\n from django.shortcuts import redirect, render\n from django.utils.http import quote\n from django.views.decorators.csrf import csrf_exempt, ensure_csrf_cookie\n \n-from uclapi.settings import FAIR_USE_POLICY\n-\n-from .models import App, User, TemporaryToken\n-from .tasks import add_user_to_mailing_list_task\n from oauth.scoping import Scopes\n+from uclapi.settings import FAIR_USE_POLICY, REDIS_UCLAPI_HOST\n \n-from .tasks import keen_add_event_task as keen_add_event\n-\n+from .app_helpers import generate_temp_api_token\n+from .models import App, User, TemporaryToken","path":"backend/uclapi/dashboard/views.py","position":22,"original_position":22,"commit_id":"baefc0818a8fd29d1ce068196d1230a44e5705ab","original_commit_id":"baefc0818a8fd29d1ce068196d1230a44e5705ab","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'.models.TemporaryToken' imported but unused","created_at":"2017-12-06T12:08:24Z","updated_at":"2017-12-06T12:08:24Z","html_url":"https://github.com/uclapi/uclapi/pull/222#discussion_r155218543","pull_request_url":"https://api.github.com/repos/uclapi/uclapi/pulls/222","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/comments/155218543"},"html":{"href":"https://github.com/uclapi/uclapi/pull/222#discussion_r155218543"},"pull_request":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/222"}}},"pull_request":{"url":"https://api.github.com/repos/uclapi/uclapi/pulls/222","id":156441418,"html_url":"https://github.com/uclapi/uclapi/pull/222","diff_url":"https://github.com/uclapi/uclapi/pull/222.diff","patch_url":"https://github.com/uclapi/uclapi/pull/222.patch","issue_url":"https://api.github.com/repos/uclapi/uclapi/issues/222","number":222,"state":"open","locked":false,"title":"Temp token to rediis","user":{"login":"Faiz","id":11671977,"avatar_url":"https://avatars0.githubusercontent.com/u/11671977?v=4","gravatar_id":"","url":"https://api.github.com/users/Faiz","html_url":"https://github.com/Faiz","followers_url":"https://api.github.com/users/Faiz/followers","following_url":"https://api.github.com/users/Faiz/following{/other_user}","gists_url":"https://api.github.com/users/Faiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Faiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Faiz/subscriptions","organizations_url":"https://api.github.com/users/Faiz/orgs","repos_url":"https://api.github.com/users/Faiz/repos","events_url":"https://api.github.com/users/Faiz/events{/privacy}","received_events_url":"https://api.github.com/users/Faiz/received_events","type":"User","site_admin":false},"body":"## What does this PR do?\r\nMoves temporary token to redis\r\n\r\n## ✅ Pull Request checklist\r\n\r\n- [x ] Is this code complete?\r\n\r\n## 🚨 Is this a breaking change for API clients?\r\nYes\r\n\r\n## :squirrel: Deploy notes\r\nRun migration.","created_at":"2017-12-05T11:46:30Z","updated_at":"2017-12-06T12:08:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c65087ad733008841d684761916997769671f6e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/uclapi/uclapi/pulls/222/commits","review_comments_url":"https://api.github.com/repos/uclapi/uclapi/pulls/222/comments","review_comment_url":"https://api.github.com/repos/uclapi/uclapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uclapi/uclapi/issues/222/comments","statuses_url":"https://api.github.com/repos/uclapi/uclapi/statuses/baefc0818a8fd29d1ce068196d1230a44e5705ab","head":{"label":"uclapi:temp-token-to-rediis","ref":"temp-token-to-rediis","sha":"baefc0818a8fd29d1ce068196d1230a44e5705ab","user":{"login":"uclapi","id":21985736,"avatar_url":"https://avatars1.githubusercontent.com/u/21985736?v=4","gravatar_id":"","url":"https://api.github.com/users/uclapi","html_url":"https://github.com/uclapi","followers_url":"https://api.github.com/users/uclapi/followers","following_url":"https://api.github.com/users/uclapi/following{/other_user}","gists_url":"https://api.github.com/users/uclapi/gists{/gist_id}","starred_url":"https://api.github.com/users/uclapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclapi/subscriptions","organizations_url":"https://api.github.com/users/uclapi/orgs","repos_url":"https://api.github.com/users/uclapi/repos","events_url":"https://api.github.com/users/uclapi/events{/privacy}","received_events_url":"https://api.github.com/users/uclapi/received_events","type":"Organization","site_admin":false},"repo":{"id":76891826,"name":"uclapi","full_name":"uclapi/uclapi","owner":{"login":"uclapi","id":21985736,"avatar_url":"https://avatars1.githubusercontent.com/u/21985736?v=4","gravatar_id":"","url":"https://api.github.com/users/uclapi","html_url":"https://github.com/uclapi","followers_url":"https://api.github.com/users/uclapi/followers","following_url":"https://api.github.com/users/uclapi/following{/other_user}","gists_url":"https://api.github.com/users/uclapi/gists{/gist_id}","starred_url":"https://api.github.com/users/uclapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclapi/subscriptions","organizations_url":"https://api.github.com/users/uclapi/orgs","repos_url":"https://api.github.com/users/uclapi/repos","events_url":"https://api.github.com/users/uclapi/events{/privacy}","received_events_url":"https://api.github.com/users/uclapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclapi/uclapi","description":"UCL API Main Repository","fork":false,"url":"https://api.github.com/repos/uclapi/uclapi","forks_url":"https://api.github.com/repos/uclapi/uclapi/forks","keys_url":"https://api.github.com/repos/uclapi/uclapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclapi/uclapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclapi/uclapi/teams","hooks_url":"https://api.github.com/repos/uclapi/uclapi/hooks","issue_events_url":"https://api.github.com/repos/uclapi/uclapi/issues/events{/number}","events_url":"https://api.github.com/repos/uclapi/uclapi/events","assignees_url":"https://api.github.com/repos/uclapi/uclapi/assignees{/user}","branches_url":"https://api.github.com/repos/uclapi/uclapi/branches{/branch}","tags_url":"https://api.github.com/repos/uclapi/uclapi/tags","blobs_url":"https://api.github.com/repos/uclapi/uclapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclapi/uclapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclapi/uclapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclapi/uclapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclapi/uclapi/statuses/{sha}","languages_url":"https://api.github.com/repos/uclapi/uclapi/languages","stargazers_url":"https://api.github.com/repos/uclapi/uclapi/stargazers","contributors_url":"https://api.github.com/repos/uclapi/uclapi/contributors","subscribers_url":"https://api.github.com/repos/uclapi/uclapi/subscribers","subscription_url":"https://api.github.com/repos/uclapi/uclapi/subscription","commits_url":"https://api.github.com/repos/uclapi/uclapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclapi/uclapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclapi/uclapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclapi/uclapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclapi/uclapi/contents/{+path}","compare_url":"https://api.github.com/repos/uclapi/uclapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclapi/uclapi/merges","archive_url":"https://api.github.com/repos/uclapi/uclapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclapi/uclapi/downloads","issues_url":"https://api.github.com/repos/uclapi/uclapi/issues{/number}","pulls_url":"https://api.github.com/repos/uclapi/uclapi/pulls{/number}","milestones_url":"https://api.github.com/repos/uclapi/uclapi/milestones{/number}","notifications_url":"https://api.github.com/repos/uclapi/uclapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclapi/uclapi/labels{/name}","releases_url":"https://api.github.com/repos/uclapi/uclapi/releases{/id}","deployments_url":"https://api.github.com/repos/uclapi/uclapi/deployments","created_at":"2016-12-19T19:41:08Z","updated_at":"2017-11-25T16:45:10Z","pushed_at":"2017-12-06T12:08:16Z","git_url":"git://github.com/uclapi/uclapi.git","ssh_url":"git@github.com:uclapi/uclapi.git","clone_url":"https://github.com/uclapi/uclapi.git","svn_url":"https://github.com/uclapi/uclapi","homepage":"https://uclapi.com","size":25089,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6,"open_issues":26,"watchers":9,"default_branch":"master"}},"base":{"label":"uclapi:master","ref":"master","sha":"60b6014348c5e268041933008730e3904b28b810","user":{"login":"uclapi","id":21985736,"avatar_url":"https://avatars1.githubusercontent.com/u/21985736?v=4","gravatar_id":"","url":"https://api.github.com/users/uclapi","html_url":"https://github.com/uclapi","followers_url":"https://api.github.com/users/uclapi/followers","following_url":"https://api.github.com/users/uclapi/following{/other_user}","gists_url":"https://api.github.com/users/uclapi/gists{/gist_id}","starred_url":"https://api.github.com/users/uclapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclapi/subscriptions","organizations_url":"https://api.github.com/users/uclapi/orgs","repos_url":"https://api.github.com/users/uclapi/repos","events_url":"https://api.github.com/users/uclapi/events{/privacy}","received_events_url":"https://api.github.com/users/uclapi/received_events","type":"Organization","site_admin":false},"repo":{"id":76891826,"name":"uclapi","full_name":"uclapi/uclapi","owner":{"login":"uclapi","id":21985736,"avatar_url":"https://avatars1.githubusercontent.com/u/21985736?v=4","gravatar_id":"","url":"https://api.github.com/users/uclapi","html_url":"https://github.com/uclapi","followers_url":"https://api.github.com/users/uclapi/followers","following_url":"https://api.github.com/users/uclapi/following{/other_user}","gists_url":"https://api.github.com/users/uclapi/gists{/gist_id}","starred_url":"https://api.github.com/users/uclapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclapi/subscriptions","organizations_url":"https://api.github.com/users/uclapi/orgs","repos_url":"https://api.github.com/users/uclapi/repos","events_url":"https://api.github.com/users/uclapi/events{/privacy}","received_events_url":"https://api.github.com/users/uclapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclapi/uclapi","description":"UCL API Main Repository","fork":false,"url":"https://api.github.com/repos/uclapi/uclapi","forks_url":"https://api.github.com/repos/uclapi/uclapi/forks","keys_url":"https://api.github.com/repos/uclapi/uclapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclapi/uclapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclapi/uclapi/teams","hooks_url":"https://api.github.com/repos/uclapi/uclapi/hooks","issue_events_url":"https://api.github.com/repos/uclapi/uclapi/issues/events{/number}","events_url":"https://api.github.com/repos/uclapi/uclapi/events","assignees_url":"https://api.github.com/repos/uclapi/uclapi/assignees{/user}","branches_url":"https://api.github.com/repos/uclapi/uclapi/branches{/branch}","tags_url":"https://api.github.com/repos/uclapi/uclapi/tags","blobs_url":"https://api.github.com/repos/uclapi/uclapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclapi/uclapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclapi/uclapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclapi/uclapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclapi/uclapi/statuses/{sha}","languages_url":"https://api.github.com/repos/uclapi/uclapi/languages","stargazers_url":"https://api.github.com/repos/uclapi/uclapi/stargazers","contributors_url":"https://api.github.com/repos/uclapi/uclapi/contributors","subscribers_url":"https://api.github.com/repos/uclapi/uclapi/subscribers","subscription_url":"https://api.github.com/repos/uclapi/uclapi/subscription","commits_url":"https://api.github.com/repos/uclapi/uclapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclapi/uclapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclapi/uclapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclapi/uclapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclapi/uclapi/contents/{+path}","compare_url":"https://api.github.com/repos/uclapi/uclapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclapi/uclapi/merges","archive_url":"https://api.github.com/repos/uclapi/uclapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclapi/uclapi/downloads","issues_url":"https://api.github.com/repos/uclapi/uclapi/issues{/number}","pulls_url":"https://api.github.com/repos/uclapi/uclapi/pulls{/number}","milestones_url":"https://api.github.com/repos/uclapi/uclapi/milestones{/number}","notifications_url":"https://api.github.com/repos/uclapi/uclapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclapi/uclapi/labels{/name}","releases_url":"https://api.github.com/repos/uclapi/uclapi/releases{/id}","deployments_url":"https://api.github.com/repos/uclapi/uclapi/deployments","created_at":"2016-12-19T19:41:08Z","updated_at":"2017-11-25T16:45:10Z","pushed_at":"2017-12-06T12:08:16Z","git_url":"git://github.com/uclapi/uclapi.git","ssh_url":"git@github.com:uclapi/uclapi.git","clone_url":"https://github.com/uclapi/uclapi.git","svn_url":"https://github.com/uclapi/uclapi","homepage":"https://uclapi.com","size":25089,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6,"open_issues":26,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/222"},"html":{"href":"https://github.com/uclapi/uclapi/pull/222"},"issue":{"href":"https://api.github.com/repos/uclapi/uclapi/issues/222"},"comments":{"href":"https://api.github.com/repos/uclapi/uclapi/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uclapi/uclapi/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/uclapi/uclapi/statuses/baefc0818a8fd29d1ce068196d1230a44e5705ab"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}