{"action":"created","comment":{"url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/comments/233473524","pull_request_review_id":174893593,"id":233473524,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzQ3MzUyNA==","diff_hunk":"@@ -0,0 +1,145 @@\n+from celery import shared_task, group, chain\n+from marshmallow import fields, Schema\n+from statsd.defaults.env import statsd\n+from sqlalchemy import Column, String, ForeignKey, func\n+from sqlalchemy.dialects.postgresql import UUID\n+from sqlalchemy.ext.declarative import declared_attr\n+from sqlalchemy.orm import relationship\n+\n+\n+class PermissionSchema(Schema):\n+    uuid = fields.UUID(required=True, allow_none=False)\n+    service = fields.String(required=True, allow_none=False)\n+    permission_string = fields.String(required=True, allow_none=False)\n+\n+\n+class RoleSchema(Schema):\n+    uuid = fields.UUID(required=True, allow_none=False)\n+    type = fields.String(required=True, allow_none=False)\n+    permissions = fields.List(fields.Nested(PermissionSchema), required=True, missing=[])\n+\n+\n+class RolePermissionAssociationMixin(object):\n+    @declared_attr\n+    def __tablename__(cls):","path":"thunderstorm_auth/roles.py","position":24,"original_position":24,"commit_id":"3ab20fa26ca7a455f1437afad8a882f913319c99","original_commit_id":"3ab20fa26ca7a455f1437afad8a882f913319c99","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/AAM/thunderstorm-auth-library/pullRequest?prid=2557348)","created_at":"2018-11-14T14:40:54Z","updated_at":"2018-11-14T14:40:54Z","html_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59#discussion_r233473524","pull_request_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/comments/233473524"},"html":{"href":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59#discussion_r233473524"},"pull_request":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59","id":230857202,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwODU3MjAy","html_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59","diff_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59.diff","patch_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59.patch","issue_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/59","number":59,"state":"open","locked":false,"title":"[TSA-719]","user":{"login":"will-norris","id":29061451,"node_id":"MDQ6VXNlcjI5MDYxNDUx","avatar_url":"https://avatars2.githubusercontent.com/u/29061451?v=4","gravatar_id":"","url":"https://api.github.com/users/will-norris","html_url":"https://github.com/will-norris","followers_url":"https://api.github.com/users/will-norris/followers","following_url":"https://api.github.com/users/will-norris/following{/other_user}","gists_url":"https://api.github.com/users/will-norris/gists{/gist_id}","starred_url":"https://api.github.com/users/will-norris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/will-norris/subscriptions","organizations_url":"https://api.github.com/users/will-norris/orgs","repos_url":"https://api.github.com/users/will-norris/repos","events_url":"https://api.github.com/users/will-norris/events{/privacy}","received_events_url":"https://api.github.com/users/will-norris/received_events","type":"User","site_admin":false},"body":"Creating this pull request so I can compare the code more easily. This description needs to be updated ahead of a full review being carried out","created_at":"2018-11-14T14:35:14Z","updated_at":"2018-11-14T14:40:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6517d3403e2121603cdbe9f77752065080fb494","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":655343059,"node_id":"MDU6TGFiZWw2NTUzNDMwNTk=","url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/labels/no%20merge","name":"no merge","color":"ff7700","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59/commits","review_comments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59/comments","review_comment_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/59/comments","statuses_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/statuses/3ab20fa26ca7a455f1437afad8a882f913319c99","head":{"label":"artsalliancemedia:TSA-719","ref":"TSA-719","sha":"3ab20fa26ca7a455f1437afad8a882f913319c99","user":{"login":"artsalliancemedia","id":2853114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMxMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2853114?v=4","gravatar_id":"","url":"https://api.github.com/users/artsalliancemedia","html_url":"https://github.com/artsalliancemedia","followers_url":"https://api.github.com/users/artsalliancemedia/followers","following_url":"https://api.github.com/users/artsalliancemedia/following{/other_user}","gists_url":"https://api.github.com/users/artsalliancemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/artsalliancemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsalliancemedia/subscriptions","organizations_url":"https://api.github.com/users/artsalliancemedia/orgs","repos_url":"https://api.github.com/users/artsalliancemedia/repos","events_url":"https://api.github.com/users/artsalliancemedia/events{/privacy}","received_events_url":"https://api.github.com/users/artsalliancemedia/received_events","type":"Organization","site_admin":false},"repo":{"id":97808596,"node_id":"MDEwOlJlcG9zaXRvcnk5NzgwODU5Ng==","name":"thunderstorm-auth-library","full_name":"artsalliancemedia/thunderstorm-auth-library","private":false,"owner":{"login":"artsalliancemedia","id":2853114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMxMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2853114?v=4","gravatar_id":"","url":"https://api.github.com/users/artsalliancemedia","html_url":"https://github.com/artsalliancemedia","followers_url":"https://api.github.com/users/artsalliancemedia/followers","following_url":"https://api.github.com/users/artsalliancemedia/following{/other_user}","gists_url":"https://api.github.com/users/artsalliancemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/artsalliancemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsalliancemedia/subscriptions","organizations_url":"https://api.github.com/users/artsalliancemedia/orgs","repos_url":"https://api.github.com/users/artsalliancemedia/repos","events_url":"https://api.github.com/users/artsalliancemedia/events{/privacy}","received_events_url":"https://api.github.com/users/artsalliancemedia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library","description":null,"fork":false,"url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library","forks_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/forks","keys_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/teams","hooks_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/hooks","issue_events_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/events{/number}","events_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/events","assignees_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/assignees{/user}","branches_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/branches{/branch}","tags_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/tags","blobs_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/statuses/{sha}","languages_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/languages","stargazers_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/stargazers","contributors_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/contributors","subscribers_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/subscribers","subscription_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/subscription","commits_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/contents/{+path}","compare_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/merges","archive_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/downloads","issues_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues{/number}","pulls_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls{/number}","milestones_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/milestones{/number}","notifications_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/labels{/name}","releases_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/releases{/id}","deployments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/deployments","created_at":"2017-07-20T08:08:58Z","updated_at":"2018-10-31T14:29:40Z","pushed_at":"2018-11-14T14:35:15Z","git_url":"git://github.com/artsalliancemedia/thunderstorm-auth-library.git","ssh_url":"git@github.com:artsalliancemedia/thunderstorm-auth-library.git","clone_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library.git","svn_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library","homepage":null,"size":210,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"artsalliancemedia:master","ref":"master","sha":"9208134added389f00a93998faa43c40174c2636","user":{"login":"artsalliancemedia","id":2853114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMxMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2853114?v=4","gravatar_id":"","url":"https://api.github.com/users/artsalliancemedia","html_url":"https://github.com/artsalliancemedia","followers_url":"https://api.github.com/users/artsalliancemedia/followers","following_url":"https://api.github.com/users/artsalliancemedia/following{/other_user}","gists_url":"https://api.github.com/users/artsalliancemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/artsalliancemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsalliancemedia/subscriptions","organizations_url":"https://api.github.com/users/artsalliancemedia/orgs","repos_url":"https://api.github.com/users/artsalliancemedia/repos","events_url":"https://api.github.com/users/artsalliancemedia/events{/privacy}","received_events_url":"https://api.github.com/users/artsalliancemedia/received_events","type":"Organization","site_admin":false},"repo":{"id":97808596,"node_id":"MDEwOlJlcG9zaXRvcnk5NzgwODU5Ng==","name":"thunderstorm-auth-library","full_name":"artsalliancemedia/thunderstorm-auth-library","private":false,"owner":{"login":"artsalliancemedia","id":2853114,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMxMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2853114?v=4","gravatar_id":"","url":"https://api.github.com/users/artsalliancemedia","html_url":"https://github.com/artsalliancemedia","followers_url":"https://api.github.com/users/artsalliancemedia/followers","following_url":"https://api.github.com/users/artsalliancemedia/following{/other_user}","gists_url":"https://api.github.com/users/artsalliancemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/artsalliancemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsalliancemedia/subscriptions","organizations_url":"https://api.github.com/users/artsalliancemedia/orgs","repos_url":"https://api.github.com/users/artsalliancemedia/repos","events_url":"https://api.github.com/users/artsalliancemedia/events{/privacy}","received_events_url":"https://api.github.com/users/artsalliancemedia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library","description":null,"fork":false,"url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library","forks_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/forks","keys_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/teams","hooks_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/hooks","issue_events_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/events{/number}","events_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/events","assignees_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/assignees{/user}","branches_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/branches{/branch}","tags_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/tags","blobs_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/statuses/{sha}","languages_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/languages","stargazers_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/stargazers","contributors_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/contributors","subscribers_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/subscribers","subscription_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/subscription","commits_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/contents/{+path}","compare_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/merges","archive_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/downloads","issues_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues{/number}","pulls_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls{/number}","milestones_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/milestones{/number}","notifications_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/labels{/name}","releases_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/releases{/id}","deployments_url":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/deployments","created_at":"2017-07-20T08:08:58Z","updated_at":"2018-10-31T14:29:40Z","pushed_at":"2018-11-14T14:35:15Z","git_url":"git://github.com/artsalliancemedia/thunderstorm-auth-library.git","ssh_url":"git@github.com:artsalliancemedia/thunderstorm-auth-library.git","clone_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library.git","svn_url":"https://github.com/artsalliancemedia/thunderstorm-auth-library","homepage":null,"size":210,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59"},"html":{"href":"https://github.com/artsalliancemedia/thunderstorm-auth-library/pull/59"},"issue":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/59"},"comments":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/artsalliancemedia/thunderstorm-auth-library/statuses/3ab20fa26ca7a455f1437afad8a882f913319c99"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}